Real Software Forums
http://forums.realsoftware.com/

[Solved] - Using scrollto in listbox
http://forums.realsoftware.com/viewtopic.php?f=1&t=47984
Page 1 of 1

Author:  newyorkpaulie [ Sun May 26, 2013 4:45 pm ]
Post subject:  [Solved] - Using scrollto in listbox

I have a few programs that use listboxes. What is the coding for getting the listbox to go to the last entry (bottom) using scrollto. Or is that not the way to do it?
In my programs I am using this to populate the box (in one of my programs):

dim f as folderitem
dim b as binarystream
dim count,i as integer

f=getFolderItem("/home/paulie/Documents/WeightList")
if f<> nil then
myListBox.deleteAllRows
b=f.openasbinaryfile(false)
count=b.ReadLong
for i=1 to count
myListBox.addrow b.readpstring
next
b.close
end if

I found this: "myListBox.ScrollPosition=myListBox.ListCount-1" and added it to the above with success. Sorry, to not find this on my own sooner... but I have the day off and had time after I posted the question.

Author:  timhare [ Sun May 26, 2013 5:13 pm ]
Post subject:  Re: Using scrollto in listbox

ScrollTo is part of the WebListbox. For a desktop Listbox, set ScrollPosition.

Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/