[Gambas-user] 2-2.21.0: CheckBox_Click event raises twice on mouseclick, once on space bar

kevinfishburne kevinfishburne at ...1887...
Mon Jul 26 05:42:59 CEST 2010


I have a checkbox control. I'd like it to call a subroutine whenever it's
checked or unchecked. The code looks like this:

PUBLIC SUB CheckBox_Preview_Water_Click()

  Preview.Refresh

END

The control and event are on the main form. "Preview" is a module and
"Refresh" is the procedure name in it.

When I actually click the control it triggers the event, which executes
Preview.Refresh. After it finishes Preview.Refresh it returns to the event.
Just after executing the END statement of the event the event is immediately
called again, as if a second trigger had been queued.

This behavior does not occur if I check/uncheck the checkbox using the space
bar. Any ideas why this could be happening or how I can circumvent it? It
also happened in the previous stable GAMBAS release.

-----
Kevin Fishburne, Eight Virtues
www:  http://sales.eightvirtues.com http://sales.eightvirtues.com 
e-mail:  mailto:sales at ...1887... sales at ...1887... 
phone: (770) 853-6271
-- 
View this message in context: http://old.nabble.com/2-2.21.0%3A-CheckBox_Click-event-raises-twice-on-mouseclick%2C-once-on-space-bar-tp29263179p29263179.html
Sent from the gambas-user mailing list archive at Nabble.com.





More information about the User mailing list