I haven't played in a while but the way I recall it:
1st. the OnActivate is called instantly everytime when you click on a button/checkbox
2nd. The OnPress or OnSet doesn't get called until you let go of the mouse button.
In other words, if you move the mouse off of the button before letting go of the button, you can cancel the click.
3rd. The OnDeactivate gets called everytime
I don't think that helps but it does help explain the buttons.. I'm not sure what goes on if you hold the button down on a checkbox.
You can try putting the set_focus in the OnDeactivate and see what happens.
Edit:
I'm not 100% sure a checkbox works like a button though.
I used to use 2 buttons for minimize/restore with the same size and location
The minimize button would hide itself and show the restore button (OnSet event)
The restore button would hide itself and show the minimize button (OnUnset event)
Last edited by Talyns : 04-21-2007 at 12:20 PM.
|