Treeview Hittest Info

  • Thread starter Thread starter pmcguire
  • Start date Start date
P

pmcguire

I'm trying to use the Hittest to determine where on a node my mouse is. Only
I want to know stuff for which there isn't a flag -- eg "Is the hit in the
upper part, the center, or the bottom part of the treenode?"

How do I do this? Must I somehow override TVM_HITTEST? Is there an easy
way to get a treenode's location and then figure out where my hit happened on
my own?

Help. Thanks
 
Well, I'm not sure if this is the BEST way, but, duhhh, the treenode class
exposes the .Bounds property, so comparing the mouse pt.y to the .Bounds.Top
gives the location within the treenode of the mouse .....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top