SetScrollPos lazarus / 31-LCL ---------------------------------------------------------------------- Jens · 2016-04-05 12:23 I'm having some difficulty changing the position of a scrollbar slider using code. This is what i tried: I created a Form containing a TreeView ( that has a bunch of items ) and a Button with the following snippet in its OnClick event. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i SetScrollPos(TreeView1.Handle, 1, 64, True); http://i.imgur.com/yyoqtHw.png When i click the button the scrollbar slider moves, but other than that the TreeView stays exactly the same. http://i.imgur.com/Hi8YTjI.png Am i missing something? ---------------------------------------------------------------------- balazsszekely · 2016-04-05 19:19 As far as I know this bug was already fixed(see ScrollBy_WS), but strangely it does not work(at least not under windows). As a workaround try this code: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TForm1.Button2Click(Sender: TObject);var  Node: TTreeNode;begin  Node := TreeView1.GetNodeAt(0, 64);  if Node <> nil then    TreeView1.TopItem := Node;end; ---------------------------------------------------------------------- Jens · 2016-04-05 21:52 Quote from: GetMem on April 05, 2016, 09:19:20 pmAs a workaround try this code I'm afraid that won't help in my situation .. i really need to be able to control the scrollbar slider per pixel. Is there anything i can do to ( help ) fix this bug? ---------------------------------------------------------------------- balazsszekely · 2016-04-06 03:00 Quote@Jens Is there anything i can do to ( help ) fix this bug?Yes! Open a bug report here: http://bugs.freepascal.org/.php . Attach a small application(source only->zipped), which reproduce the issue. Please also read this: http://wiki.lazarus.freepascal.org/How_do_I_create_a_bug_report ---------------------------------------------------------------------- Jens · 2016-04-06 13:09 Quote from: GetMem on April 06, 2016, 05:00:06 amYes! Open a bug report Done! Just noticed i accidentally submitted it in the FPC project category instead of Lazarus though. Is there any way to modify this? I've also been plowing through the Lazarus source-code myself, but haven't been able to find the culprit yet .. ---------------------------------------------------------------------- balazsszekely · 2016-04-06 14:04 QuoteJust noticed i accidentally submitted it in the FPC project category instead of Lazarus though. Is there any way to modify this?@Jonas already moved to Lazarus.