Page 1 of 1

Double click

Posted: 19 Jan 2009, 23:03
by AnnaS
Thanks for the great controls.
I noticed a flaw:
On a controls that you can click (like the OptionButton, CheckBox, CommandButton) a double click is not handled correctly.
Do a few double clicks rapidly on the same control, then in that process hold down the mouse button.
Something like that:

Down
Up
Down
Up
Down
Up
Down

Now take a look at the control's appearance. You will see that it displays a normal hover state, but it should be in a down state.
I think this is because you don't handle double clicks correctly. This is a known problem, and some people handle it by calling a MouseDown event when a DoubleClick event occurs. And some people even eat the DoubleClick event in their subclasser.

Thank you.

Re: Double click

Posted: 20 Jan 2009, 09:44
by TiKu
I'll have a look.

Re: Double click

Posted: 16 Feb 2009, 20:43
by TiKu
I did some tests and noticed something odd which probably is related to the problem you describe.
On Vista, buttons have that animation when they are clicked. They don't switch immediately between hovered and pushed state, but fade between both states. There is a difference how the native button (and this of VB6) and my button handle the case where you push the button again while the fade animation from pushed to hovered state is not finished yet. A native button seems to abort the animation and switches back to pushed state immediately. My button doesn't do this, in fact it seems to swallow the mouse-down.
Why this is so, I have no clue so far. I've deactivated any custom message processing my button is doing, but the behavior is still the same.