New topic: 

ListBox ScrollTo behavior workaround needed

<http://forums.realsoftware.com/viewtopic.php?t=47896>

         Page 1 of 1
   [ 4 posts ]                 Previous topic | Next topic          Author  
Message        dgdavidge          Post subject: ListBox ScrollTo behavior 
workaround neededPosted: Thu May 16, 2013 11:55 am                         
Joined: Fri Jun 02, 2006 1:43 pm
Posts: 206
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                DaveS          Post subject: 
Re: ListBox ScrollTo behavior workaround neededPosted: Thu May 16, 2013 12:00 
pm                                 
Joined: Sun Aug 05, 2007 10:46 am
Posts: 4882
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                dgdavidge          Post 
subject: Re: ListBox ScrollTo behavior workaround neededPosted: Thu May 16, 
2013 12:08 pm                         
Joined: Fri Jun 02, 2006 1:43 pm
Posts: 206
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                dgdavidge          Post 
subject: Re: ListBox ScrollTo behavior workaround neededPosted: Thu May 16, 
2013 1:59 pm                         
Joined: Fri Jun 02, 2006 1:43 pm
Posts: 206
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             Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 4 posts ]      
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to