OnHoverIn is messy. The usual way is to create two custom buttons, one to overlay the default button, the second one is invisible. Invisible one gets your hide_window code in it's OnActivate event, followed by an activated=false. The first button activated the second button depending on the state of the checkbox, so Parent.SecondButton.Activated=Parent.Parent.YourCheckbox.checked.
|