ALL_EVENTS keyword in WIDGET_TEXT [message #5170] |
Tue, 17 October 1995 00:00 |
gfu
Messages: 10 Registered: October 1995
|
Junior Member |
|
|
Hi,
I thought that the keyword ALL_EVENTS in WIDGET_TEXT will allow
me to detect all keys I pressed in the WIDGET_TEXT widget.
However, in the example program, there is no event generate when
I press the <upper arrow> or <down arror> keys. Any explanation
on this ?
Thanks.
Gary
;*********************************************************** *******
pro text_event_EVENT, event
COMMON wid, cmd, quit
CASE event.id OF
quit: BEGIN
WIDGET_CONTROL, event.top, /DESTROY
RETURN
END
cmd: BEGIN
help, event, /structure
END
ELSE: BEGIN
END
ENDCASE
END
;*********************************************************** *****************
pro text_event
COMMON wid, cmd, quit
base = WIDGET_BASE(xoffset=50, yoffset=50, title="Test event")
base0 = WIDGET_BASE(base, /COLUMN)
base1 = WIDGET_BASE(base0, /ROW)
label1 = WIDGET_LABEL(base1, VALUE="Command :")
cmd = WIDGET_TEXT(base1, /EDIT, XS=60, /ALL_EVENTS)
quit = WIDGET_BUTTON(base0, VALUE="Quit")
WIDGET_CONTROL, /REAL, base
XMANAGER, "text_event", base, event="text_event_EVENT"
end
|
|
|