Delphi tips :

How to make the last added item of a ListBox visible

When adding items to a ListBox, there comes a time that the last added item is not visible anymore.
Solution: with the following line of code, the ListBox will display all of the LAST items that fit into the box, with the very last item at the bottom:
ListBox1.TopIndex := ListBox1.Items.Count - 1;


DelphiLand Club Members of the DelphiLand Club receive our Crash Course Delphi, plus the fully commented source code of numerous projects, plus guaranteed answers from our Delphi Forum. Membership is for life!

TOP   DelphiLand Club Membership  DC Library  Forum  Forum Archives  Crash Course Delphi  Tips  Source Code  Downloads  Links