[Mono-winforms-list] Bug in ButtonBase is_entered code

John BouAntoun jba-mono@optusnet.com.au
Thu, 07 Oct 2004 20:51:19 +1000

Hi Guys,

I think I found a bug on line 433 of ButtonBase.cs

			// If the button was pressed and we leave, release the button press and vice versa
			if (this.Capture && (inside != is_pressed)) {
				is_pressed = inside;
				redraw = true;

Basically I think this code releases the is_pressed bool if the mouse
leaves the control.

I think this is wrong. I'm pretty sure that in windows if you click and
hold a control down it will keep the is_pressed state active even if you
leave the control. Proof of this is if you click and hold a checkbox,
leave the checkbox and then return to the checkbox and release the mouse
button, this still results in a click.

I wanted to try and change it, but was not sure how to change this
without impacting other variables (Capture and iniside). 

Peter can you look into this and get back to me.