Keyboard events in a widget [message #14446] |
Thu, 04 March 1999 00:00 |
Daniel SAGE
Messages: 10 Registered: April 1998
|
Junior Member |
|
|
Hi,
How is it possible to generate an event when the user enters some characters
in a widget_text or when the focus change of widget_text?
With the small following example, I can catch only the Carriage Return key
pro test_event, event
print, event
end
pro test
w=widget_base( /COLUMN, /KBRD_FOCUS_EVENTS)
item1 = widget_text(w, value='1', /EDITABLE)
item2 = widget_text(w, value='2', /EDITABLE)
widget_control, /REALIZE, w
xmanager, 'test', w,/JUST_REG
end
------------------------------------------------------------ ----------------
Daniel Sage
EPFL - Swiss Federal Institute of Technology - http://www.epfl.ch
BIG - Biomedical Imaging Group - http://bigwww.epfl.ch
Address: EPFL, DMT/IOA, BM, CH-1015 Lausanne, Switzerland
Tel: +41 21 693 5189
Fax: +41 21 693 3701
Email: daniel.sage@epfl.ch
------------------------------------------------------------ ----------------
|
|
|