Hi inmarket, I've tried your idea, but the issue with it is that I'd like to have a Button Release event. I need to know both when it's initially pressed and when it's finally release based on events rather than polling. The checkbox does give me an event when I press but doesn't seem to issue any events when it's released.
The functional requirement is like this:
Person presses a screen button and that triggers an output function.
Whilst the button is still pressed the output continues.
The person releases the button and the output stops.
If this is done with events then the button release event can trigger the appropriate output to stop. Otherwise I have to use a timer to poll that button, which is more tangled than just acting on the event.
I had one hacky idea, which was to swap the checkbox type to a button type after it was pressed ? That way I'd could get a GEVENT_GWIN_CHECKBOX for the press and a GEVENT_GWIN_BUTTON for the release.