Re: How to keep a widget in front? [message #5296 is a reply to message #5293] |
Wed, 15 November 1995 00:00   |
fireman
Messages: 49 Registered: August 1991
|
Member |
|
|
In article <48djln$b8f@post.gsfc.nasa.gov>, thompson@orpheus.nascom.nasa.gov (William Thompson) writes...
> Supposed that you added a TIMER event to
> your widget base. Then you could use that to bring the window to the
> foreground at regular intervals, e.g. once per second.
I followed up on Bill's suggestion by writing this little routine. I don't
know how far back timer events go, but it works just fine under IDL 3.6.1.
Sadly, I am bound to version 3.0.0, which doesn't have timer events; I'll
just have to pass around the widget IDs and use WIDGET_CONTROL,/SHOW.
------------------------------------------------------------ -------------------
PRO LITTLE_EV, EVENT
WIDGET_CONTROL, event.id, GET_UVALUE = eventval
if eventval eq 'EXIT' then WIDGET_CONTROL,event.top,/DESTROY
if eventval eq 'POP_FRONT' then WIDGET_CONTROL, event.top, /SHOW, timer=1
end
PRO LITTLE
base = WIDGET_BASE(uvalue='POP_FRONT')
button = widget_button(base, value='EXIT', uvalue='EXIT')
WIDGET_CONTROL, base, /REALIZE
WIDGET_CONTROL, base, timer=1
XManager, "LITTLE", base, EVENT_HANDLER = "LITTLE_EV"
end
------------------------------------------------------------ -------------------
Gwyn Fireman, fireman@gsfc.nasa.gov, speaking only for myself.
|
|
|