Re: How to get windows id or title by clicking on it [message #66892 is a reply to message #66891] |
Thu, 18 June 2009 19:44   |
Jeanphi62
Messages: 10 Registered: June 2009
|
Junior Member |
|
|
To sum up :
I have to link the event tlb_kill_request_events with the function
close_window.pro and the event kbrd_focus_events with the function
test_window.pro (this function gives me the number of the window) so I
tried :
tlb = widget_base(title="mywindow", MBAR=mbar, /col, $
/tlb_kill_request_events, event_pro=close_window, $
/kbrd_focus_events, event_pro='test_window')
but the software crashes.
If I just do :
tlb = widget_base(title="mywindow", MBAR=mbar, /col, $
/kbrd_focus_events, event_pro='test_window')
the software obviously doesn't link the will to destroy the widget
with the top right cross button with the function close_window
anymore.
I tried to create parent and child structure :
tlb0 = widget_base(title="mywindow", $
/tlb_kill_request_events, event_pro=close_window)
tlb = widget_base(GROUP_LEADER=tlb0, $
MBAR=mbar, /col, $
/kbrd_focus_events, event_pro='test_window')
but, one more time, IDL only considers the second key word and doesn't
link the will to destroy the widget with the top right cross button
with the function close_window.
So what could I do to link with this widget_base both events ?
Thank you for advance
Cheers
Jeanphi
|
|
|