[AccessD] Tree View Control

Stuart McLachlan stuart at lexacorp.com.pg
Tue Dec 23 16:48:36 CST 2003

On 23 Dec 2003 at 14:50, Julie Reardon-Taylor wrote:

> Arthur,
> Thank you for your help. We were able to get the drag and drop capabilities 
> to work well with the parent and child nodes, but now have another problem.
> When our list is longer than our tree view box, and we would like to drag 
> and drop down below the viewable portion of our window, the scroll bar does 
> not automatically move.  How can I tell the tree view object to 
> automatically scroll up or down when the mousedown and mouseup events occur?

It gets quite tricky.

You need to keep checking the mouse position in the dragover event 
and if it is close to the top or bottom of the treeview, you need to 
switch on a fast timer and keep sending  a WM_VSCROLL  message to the 
 treeview while you are hovering close to the edge.

A VB sample which you could easily modify is at:


(watch for wrap)

I've used variations of this code a number of times.

Lexacorp Ltd
Information Technology Consultancy, Software Development,System 

More information about the AccessD mailing list