On Mar 3, 2006, at 1:44 AM, Emile Schwarz wrote:
Hi,
Platform and version numbers not relevant (REALbasic 5.5.5 and up)
What code will you use from the two below to scroll the Rows to the
ListBox' last line (Row) ?
BTW: the ListBox is populated by a Loop (either to load text from
disk, data from DataBase, or computed values like dates, step,
delta, and so on)
1. I like this one (and with a small amount of lines, using
ListBox1.Refresh is not so slow and it is fun to watch the
scrolling ;)
// Scroll the ListBox
ListBox1.ListIndex = ListBox1.LastIndex // Isn't it funny ?
The objective is to scroll to the last row of the listbox and select it?
I can't use the first one because LastIndex is not the index of the
last row. For example, add 5 rows to a listbox and put this in a
pushbutton:
ListBox1.InsertRow "dog", 2
ListBox1.ListIndex = ListBox1.LastIndex
To scroll to the last row and select it use:
ListBox1.ListIndex = ListBox1.ListCount - 1
Regards,
Jack
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>