Tree View problem

  • Thread starter Thread starter Nick Warrington
  • Start date Start date
N

Nick Warrington

Hi all,

I am having a small problem with a tree control I am playing with.

I have created a custom tree view that displays nodes with a linktext control to the right of the nodes. When the linktext is clicked the linktext control is hidden and a combo box appears in its place that allows the
user to choose an option. Once selected, the combo is hidden and the linktext control reappears displaying the new selection.

My problem is that when the tree view is scrolled my linktext controls stay where they are and no longer line up with the nodes. I couldn't find an treeview event to provide a mechanism for triggering the code to move
the linktext controls.

Anyone got any suggestions?

Thanks

Nick
 
My problem is that when the tree view is scrolled my linktext controls
stay where they are and no longer line up with the nodes. I couldn't find
an treeview event to provide a mechanism for triggering the code to move
the linktext controls.

I was looking this up in MSDN.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/pla
tform/commctls/treeview/treeview.asp
The tree view has a WM_VSCROLL notification that is sent when scrolling
event occurs.
WM_VSCROLL : Scrolls the tree-view control. It returns TRUE if scrolling
occurs, or FALSE otherwise.

Looking up WM_VSCROLL in msdn.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/pla
tform/commctls/scrollbars/scrollbarreference/scrollbarmessages/wm_vscroll.as
p
It says : The WM_VSCROLL message is sent to a window when a scroll event
occurs in the window's standard vertical scroll bar. This message is also
sent to the owner of a vertical scroll bar control when a scroll event
occurs in the control. A window receives this message through its
WindowProc function.


Hope this helps.
--
Adrian Mascarenhas, Developer Division

This posting is provided "AS IS" with no warranties, and confers no rights.

Note: For the benefit of the community-at-large, all responses to this
message are best directed to the newsgroup/thread from which they
originated.
 
Back
Top