Jump to content
  • Advertisement
Sign in to follow this  
Niksan2

[.net] TreeView and Scrollbars [Solved]

This topic is 3738 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, Does anyone know if it's possible to get any indication when a scrollbar has been clicked on a treeview ? The reason I ask is that I use a TextBox sat on the treeview used for multi-column editing, but when you click on the scrollbars of a TreeView the control doesn't gain focus so am unable to losefocus/hide the TextBox, I know I can do this by subclassing the TreeView and overriding WndProc look for scroll messages, but I guess this may only work when actually scrolling and not just by clicking on it, which shouldn't be an issue, but I just wondered if there was another way as currently I'm using the designer to create a user control with a treeview attached to emulate VisualStudios watch window, all works apart from this little niggle. Cheers, Nik. [Edited by - Niksan2 on February 28, 2008 5:57:35 AM]

Share this post


Link to post
Share on other sites
Advertisement
Ok, I'll answer my own question as the old post/solve shinanigans hits home again :) and if it helps anyone else, I displayed all messages (WndProc) for the actual root user control and it was getting a few messages passed through when clicking on the scrollbar, parentnotify, mouseactivate, and a couple of notify/setcursor one for a mouse up and mouse down event, so I checked if the control wasn't in focus and the parentnotify was received to then set the control to focus, seems to work, but I'm sure there will be some pitfalls at some point, maybe.

Cheers,

Nik.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!