Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Sun Sep 24, 2017 1:42 am
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: [Solved] - Using scrollto in listbox
PostPosted: Sun May 26, 2013 4:45 pm 
Offline

Joined: Sat Dec 30, 2006 6:52 pm
Posts: 130
Location: New York City
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.


Last edited by newyorkpaulie on Sun May 26, 2013 5:14 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: Using scrollto in listbox
PostPosted: Sun May 26, 2013 5:13 pm 
Offline

Joined: Fri Jan 06, 2006 3:21 pm
Posts: 12388
Location: Portland, OR USA
ScrollTo is part of the WebListbox. For a desktop Listbox, set ScrollPosition.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group