Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_vb thread: Treeview Scroll Event


Message #1 by "Alan Whittall" <Alan.Whittall@L...> on Tue, 28 Jan 2003 15:50:59
Hello Alan,

the TreeView control shipped with VB does not expose a scroll event.
You can trap the event subclassing the control (lot of examples
on the web, I sugggest you using a good subclassing control) or
you can go with a different user interface. It can be kind of messy
to find out which is the first node visible, which is expanded and
which is collapsed, not that easy unless you use API (if available).

Instead of subclassing you can also set a timer with a short interval,
and in the fire event repopulate your grid according to the tree
(only if it needs to). Not that I am happy with this tecnique either.
There is also the problem to set the grid row height the same as the
tree node height...

IMHO, I will definetively go with other interface/components.

Marco

> Problem: How can I tell that the treeview has scrolled, by how much and 
in 
w> hat direction.

> Thanks
A> lan

  Return to Index