Re: pop up widget [message #16434] |
Tue, 27 July 1999 00:00 |
Harald Frey
Messages: 41 Registered: March 1997
|
Member |
|
|
FIT wrote:
> Hi,
>
> I am looking for a technique to produce a widget with the following
> characteristics:
>
> 1.) It pops up upon fulfillment of a certain program condition
> 2.) It always stays in front
> 3.) No user interaction can take place with the widget or with the
> remaining widgets of the program
> 4.) The widget disappears automatically after a limited period of time
> and normal interaction with the remaining widgets is going to take place
> again
>
Why don't you just use the /HOURGLASS keyword to show
the user the system is busy?
=========================================================
Harald U. Frey
Space Sciences Lab phone: 510-643-3323
University of California fax: 510-643-2624
Berkeley, CA 94720-7450 email: hfrey@ssl.berkeley.edu
|
|
|
Re: pop up widget [message #16439 is a reply to message #16434] |
Tue, 27 July 1999 00:00  |
gabriel rodriguez ibe
Messages: 10 Registered: July 1999
|
Junior Member |
|
|
FIT wrote:
> Hi,
>
> I am looking for a technique to produce a widget with the following
> characteristics:
>
> 1.) It pops up upon fulfillment of a certain program condition
Construct the widget-tree on a event-handler (if 'program condition' is a
event), or whenever the 'program condition' is true
>
> 2.) It always stays in front
; Use the keyword /FLOATING in the top-level base, together with the
GROUP_LEADER=widgetID, where widgetID is the id of a widget you want the
widget to be in front of.
3.) No user interaction can take place with the widget or with the remaining
widgets of the program
; Use the /MODAL keyword in the top-level base of your new tree, or use the
SENSITIVE=0 keyword with WIDGET_CONTROL to de-sensitize any widget tree you
don't want user interacting with
>
> 4.) The widget disappears automatically after a limited period of time
> and normal interaction with the remaining widgets is going to take place
> again
>
Use WIDGET_CONTROL, ev.id, TIMER=periodOfTime, where ev.id can be any
widget; and in the event-handler routine destroy the widget tree when the
TIMER event is received (if you had used SENSITIVE=0 don't forget to make
/SENSITIVE to the widgets before destroying your new tree)
>
> Any help is appreciated. Thank you in advance for Your efforts.
>
> Sincerely, Arno R. Schleich, MS, MD
>
> --
> Functional Imaging Technologies GmbH
> Siemensstr. 40/41
> 12247 Berlin
> Germany
>
> fon.: +49 (0)30 76 90 24 80
> fax.: +49 (0)30 76 90 24 81
>
> mailto:fit@functional-imaging.com
> htp://www.functional-imaging.com
|
|
|
Re: pop up widget [message #16440 is a reply to message #16434] |
Tue, 27 July 1999 00:00  |
J.D. Smith
Messages: 214 Registered: August 1996
|
Senior Member |
|
|
FIT wrote:
>
> Hi,
>
> I am looking for a technique to produce a widget with the following
> characteristics:
>
> 1.) It pops up upon fulfillment of a certain program condition
> 2.) It always stays in front
> 3.) No user interaction can take place with the widget or with the
> remaining widgets of the program
> 4.) The widget disappears automatically after a limited period of time
> and normal interaction with the remaining widgets is going to take place
> again
>
> Any help is appreciated. Thank you in advance for Your efforts.
>
A top-level floating modal widget_base with nothing but a label, which
simply blocks for some period of time would seem to do the trick.
I tried something like:
pro MyApp_event, ev
warn,ev.top
end
pro warn, leader
b=widget_base(GROUP_LEADER=leader,/FLOATING,/MODAL,/COLUMN)
lab=widget_label(b,value=" Please Wait 10 Seconds ")
widget_control, b,/realize
wait,10
widget_control, b,/destroy
end
pro testtlb
app=widget_base(/ROW)
lab=widget_label(app,value='The application')
b=widget_button(app,value='Take Input')
widget_control, app,/REALIZE
XManager, 'MyApp',app,/NO_BLOCK
end
which seemed to do what you want. For some reason on my Linux vs.
5.2.1, it takes a moment for the warning text to appear after the base
is realized.
JD
--
J.D. Smith |*| WORK: (607) 255-5842
Cornell University Dept. of Astronomy |*| (607) 255-6263
304 Space Sciences Bldg. |*| FAX: (607) 255-5875
Ithaca, NY 14853 |*|
|
|
|