Question from user:
I am displaying a group of buttons with CW_BGROUP. I print out events when they happen. I don't see any event when I press the button but I see one when I release it. I do not have the /norelease
argument because I want to see the release event as well. I would like to see the event that occurs (if it occurs) when the button is pressed.
Possible answer:
Use the PUSHBUTTON_EVENTS keyword. An example is shown below:
pro dj_cas_19437_l1k4p5_event, event
COMPILE_OPT idl2
help, event
end
pro dj_cas_19437_l1k4p5
compile_opt idl2
wbase = widget_base()
wbutton = widget_button(wbase, value="Button", /PUSHBUTTON_EVENTS)
widget_control, wbase, /realize
XMANAGER, "dj_cas_19437_l1k4p5", wbase, NO_BLOCK=1
end
|