Infralution Support Forum Index Infralution Support
Support groups for Infralution products
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to control scroll bars

 
Post new topic   Reply to topic    Infralution Support Forum Index -> Virtual Tree Support
View previous topic :: View next topic  
Author Message
billcch



Joined: 19 Jan 2007
Posts: 44

PostPosted: Thu Dec 03, 2009 7:35 pm    Post subject: How to control scroll bars Reply with quote

I have two virtual trees, both contains the same nodes, and I need to keep scroll bars synchronize, for instance, TopRowIndex changed in the tree1 should trigger the tree2 change the TopRowIndex to the same number; and if user move the HorzScrollBar in one tree, another tree should have the same movement. Could you help me to make it happen?

I am using 3.13.0.0.

Thanks
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Thu Dec 03, 2009 9:38 pm    Post subject: Reply with quote

Unless the state of the two trees is completely the synchronised - ie they are displaying the same data, expanded in the same way with the same columns - then this is going to be quite difficult since the position of the scroll bars depends on how much of the tree is expanded etc. If the data is that similar I'm not sure what the point of having two trees would be - why not just add more columns to one tree?

When trees are displaying related data it is possible to handle the SelectionChanged event in one tree, then find the corresponding Row in the other tree and select it.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
billcch



Joined: 19 Jan 2007
Posts: 44

PostPosted: Fri Dec 04, 2009 12:40 am    Post subject: Reply with quote

There are displaying similar data (not exactly the same), but the hierarchy are the same. I have done synchronise both selection change and node expanding. Use two trees are the request from our customer, the scroll bar behavior needs to be similar like the sofeware named Beyound Compare.
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Fri Dec 04, 2009 10:42 pm    Post subject: Reply with quote

If you derive a new class from VirtualTree then you can access the protected HorzScollBar and VertScrollBar properties that provide access to the underlying scroll controls for Virtual Tree. You could then attach events handlers and attempt to synchronize that way.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Infralution Support Forum Index -> Virtual Tree Support All times are GMT
Page 1 of 1

 
Jump to:  
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
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group