Re: How to keep a widget in front? [message #5293] |
Thu, 16 November 1995 00:00  |
sjt
Messages: 72 Registered: November 1993
|
Member |
|
|
Gwyn F. Fireman (fireman@iuegtc.gsfc.nasa.gov) wrote:
: How do I keep an IDL widget in front of all windows? I have a small
: floating widget and don't want to lose sight of it when clicking on the
: larger widget behind it. I'd prefer not to use WIDGET_CONTROL,/SHOW as it
: would mean always passing the ID for the smaller widget to the event
: handler of the larger - and the two may be unrelated.
: Thanks in advance,
: Gwyn
: ---
: Gwyn Fireman, fireman@gsfc.nasa.gov, speaking only for myself.
Here's one kludge solution which I use:
1) Give a normally non-event generating widget [e.g. a base or a label --
hereafter called the dummy widget] within the floating widget a UVALUE
(assuming you handle your events by UVALUE).
2) After realizing the floating widget, send a timer event to the dummy
widget with a delay of (say) 2 seconds.
3) In the event handler for you floating widget have the event actio
for the dummy consist of:
widget_control, event.top, /show
widget_control, event.id, timer=2.0
While this won't make it un-hideable, at least it will pop to the front
every 2 seconds.
--
+------------------------+---------------------------------- --+---------+
| James Tappin, | School of Physics & Space Research | O__ |
| sjt@star.sr.bham.ac.uk | University of Birmingham | -- \/` |
| Ph: 0121-414-6462. Fax: 0121-414-3722 | |
+----------------------------------------------------------- --+---------+
|
|
|