[SOLVED] Autoscroll listbox lazarus / 31-LCL ---------------------------------------------------------------------- pcurtis · 2022-11-15 12:05 How to scroll a listbox to the last item? ---------------------------------------------------------------------- itblumi · 2022-11-15 12:13 Have a look at this topic https://forum.lazarus.freepascal.org/index.php?topic=51257.0 maybe it helps you allready ---------------------------------------------------------------------- pcurtis · 2022-11-15 12:28 sorry I meant listbox ---------------------------------------------------------------------- itblumi · 2022-11-15 12:49 You can set the TopIndex(without selecting an item) or the ItemIndex(with selecting an item) of TListBox Example: 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 ListBox1.TopIndex := ListBox1.Count - 1; // this is without selecting an item  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 ListBox1.ItemIndex := ListBox1.Count - 1; // this is with selecting the last item ---------------------------------------------------------------------- jamie · 2022-11-15 13:05 ListBox.MakeCurrentVisable Set the Index to the last item and call that etc. ---------------------------------------------------------------------- pcurtis · 2022-11-20 13:01 @itblumi - Thanks