New topic: 

synchronizing 2 listboxes

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

         Page 1 of 1
   [ 4 posts ]                 Previous topic | Next topic          Author  
Message        DevMix          Post subject: synchronizing 2 listboxesPosted: 
Tue Nov 06, 2012 9:42 am                         
Joined: Mon Oct 09, 2006 9:05 am
Posts: 117                Is it possible to synchronize 2 listboxes when you 
scroll one of them?
Means, you scroll only one Listbox and the other listbox scrolls automatically.

thx in adv.      
_________________
Working system: Mac OS X 10.6.x
_________________________________
Note : I am not interested in any solutions that need custom Plug-ins of any 
kind   
                             Top                DaveS          Post subject: 
Re: synchronizing 2 listboxesPosted: Tue Nov 06, 2012 1:22 pm                   
              
Joined: Sun Aug 05, 2007 10:46 am
Posts: 4238
Location: San Diego, CA                yes.... in the ValueChanged of one... 
set the ScrollPostion of the other

becareful if you want A to control B  and B to control A that you don't get 
into a endless loop      
_________________
Dave Sisemore
MacPro, OSX Lion 10.7.4 RB2012r1
Note : I am not  interested in any solutions that involve custom Plug-ins of 
any kind  
                             Top                DevMix          Post subject: 
Re: synchronizing 2 listboxesPosted: Tue Nov 06, 2012 3:11 pm                   
      
Joined: Mon Oct 09, 2006 9:05 am
Posts: 117                Thank you DaveS.

DaveS wrote:yes.... in the ValueChanged of one... set the ScrollPostion of the 
other
But somehow, the Listboxes here(using RS2011r2)don't have any ValueChanged 
events. There is only a change event which does not work correctly.

Any idea?      
_________________
Working system: Mac OS X 10.6.x
_________________________________
Note : I am not interested in any solutions that need custom Plug-ins of any 
kind   
                             Top                doofus          Post subject: 
Re: synchronizing 2 listboxesPosted: Tue Nov 06, 2012 4:35 pm                   
              
Joined: Thu Sep 10, 2009 2:50 am
Posts: 292
Location: Santa Cruz, CA, USA                DevMix wrote:the Listboxes 
here(using RS2011r2)don't have any ValueChanged events.
I was wondering the same thing. I think maybe he meant to do like in the 
"Customized Scroll Controls" section of the docs 
http://docs.realsoftware.com/index.php/Listbox and maintain a separate 
scrollbar.

To do that set the scrollbars maximum to the number of unseen rows, pagestep to 
the number of showing rows, in ValueChanged set the Listbox's scrollposition 
and implement the listboxes MouseWheel event to adjust the scrollbar. But I 
don't see an easy way to keep the scrollbar synced for row additions/deletions. 
Maybe override all such methods to update the scrollbar?   
                             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