Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Mon May 22, 2017 6:32 pm
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: ListBox ScrollTo behavior workaround needed
PostPosted: Thu May 16, 2013 11:55 am 
Offline

Joined: Fri Jun 02, 2006 1:43 pm
Posts: 209
Location: Santa Ynez, CA
The ListBox ScrollTo function scrolls the data up or down until the specified row is shown, either at the top or bottom of the listbox. For example, with a listbox that shows 8 rows, scrolling from the top to row 21 shows rows 14 to 21 while scrolling from the bottom shows rows 21 to 14.

I am trying to make an alphabetical index for that will scroll the listbox to the first occurrence of the selected letter. It works, but I would like it to show the same data no matter whether it is scrolling up or down to get there. For that, I need to know what is showing in the listbox to start with so I can tell if it will be scrolling up or down. Is that possible with RS? or maybe XOJO next month?

If I was working with PHP, I could get the position using Javascript, but I have no idea how to refer to any of the DOM objects. Is there any documentation on this?


Last edited by dgdavidge on Thu May 16, 2013 12:01 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: ListBox ScrollTo behavior workaround needed
PostPosted: Thu May 16, 2013 12:00 pm 
Offline
User avatar

Joined: Sun Aug 05, 2007 10:46 am
Posts: 4931
Location: San Diego, CA
do a Scrollto 0 ...and THEN scrollto where you want to be.....
if you disable the control first... it should not flicker

_________________
Dave Sisemore
iMac I7[2012], OSX Mountain Lion 10.8.3 RB2012r2.1
Note : I am not interested in any solutions that involve custom Plug-ins of any kind


Top
 Profile  
 
 Post subject: Re: ListBox ScrollTo behavior workaround needed
PostPosted: Thu May 16, 2013 12:08 pm 
Offline

Joined: Fri Jun 02, 2006 1:43 pm
Posts: 209
Location: Santa Ynez, CA
I already tried that. It doesn't work with Chrome running in the Windows debugger. I haven't tried it anywhere else yet.


Top
 Profile  
 
 Post subject: Re: ListBox ScrollTo behavior workaround needed
PostPosted: Thu May 16, 2013 1:59 pm 
Offline

Joined: Fri Jun 02, 2006 1:43 pm
Posts: 209
Location: Santa Ynez, CA
Problem solved. Instead of using ScrollTo(0) at the start, I scrolled to the bottom so that when it scrolls back up to the first row starting with the desired letter. The code to scroll to the desired line goes in a timer. Disabling the listbox did not prevent the scrolling down then back up, but with a timer period of 100, its just one continuous movement that's too fast to see what it is really doing.


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

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 2 guests


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:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group