TreeViwe MouseUp

H

Hamilton Woods

Community,

Is there a reason that the MouseUp event for a windows form TreeView control
fires when the mouse is moved while the left mouse button is held down?
I think you'll find this one repeatable. Make a scratch windows form
project. Place a TreeView control on the form. Add some nodes to the
control. Add an event handler for its MouseUp event. Set a breakpoint in
that event handler. Watch what happens. I'm using VS.NET 1.0.
If you have an empty TreeView control, the MouseUp event fires when the left
mouse button is pressed, even before the mouse is moved. Huh.

Thanks,

--
Hamilton Woods
Accutrol, LLC
7500 S. Memorial Pkwy, 215-V
Huntsville, AL 35802
256-882-7433
(e-mail address removed)
 
H

Herfried K. Wagner [MVP]

* "Hamilton Woods said:
Is there a reason that the MouseUp event for a windows form TreeView control
fires when the mouse is moved while the left mouse button is held down?
I think you'll find this one repeatable. Make a scratch windows form
project. Place a TreeView control on the form. Add some nodes to the
control. Add an event handler for its MouseUp event. Set a breakpoint in
that event handler. Watch what happens. I'm using VS.NET 1.0.
If you have an empty TreeView control, the MouseUp event fires when the left
mouse button is pressed, even before the mouse is moved. Huh.

I am able to repro the behavior you describe on a .NET 1.0 machine. I
would consider that to be a bug.
 
H

Hamilton Woods

Where do we go from here?

--
Hamilton Woods
Accutrol, LLC
7500 S. Memorial Pkwy, 215-V
Huntsville, AL 35802
256-882-7433
(e-mail address removed)
 
E

Eric Newton

Exactly how do you define "seems to work fine"... as in, A) it correctly
does NOT fire MouseUp or B) MouseUp is still firing but you feel that its
the intended behavior?

--
Eric Newton
C#/ASP Application Developer
http://ensoft-software.com/
(e-mail address removed)-software.com [remove the first "CC."]

Tim Wilson said:
It seems to work fine in 1.1
 
T

Tim Wilson [MVP]

The MouseUp event IS firing at the appropriate time in 1.1 - when the mouse
button is released and not when the mouse is moved.

--
Tim Wilson
..Net Compact Framework MVP

Eric Newton said:
Exactly how do you define "seems to work fine"... as in, A) it correctly
does NOT fire MouseUp or B) MouseUp is still firing but you feel that its
the intended behavior?

--
Eric Newton
C#/ASP Application Developer
http://ensoft-software.com/
(e-mail address removed)-software.com [remove the first "CC."]
 

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

Top