11-22-2005 05:23 AM
11-22-2005 07:22 AM
11-22-2005 07:53 AM
The reason why you cannot get the "button down" event is that on normal buttons the commit event is fired when you release the button: in fact you can press a button, maintain the mouse pressed and move the pointer outside the control and then release the mouse: no commit event is fired in this case (as is in almost all windows applications).
Sheetal suggestion seems the most reasonable way to handle your case, apart that it's a functon, not a callback, This means that you will need to call it in a loop or in a callback fired by another event.
Nevertheless, before the commit event is generated EVENT_LEFT_CLICK and EVENT_RIGHT_CLICK events are fired, so you could use them to trigger your function.
Another way to mimic a mouse pressed event is to change your button to a toggle button: in this case the commit event is generated when you press it..