comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: realizing nonmodal widgets
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: realizing nonmodal widgets [message #18331] Wed, 22 December 1999 00:00
Bernard Puc is currently offline  Bernard Puc
Messages: 65
Registered: January 1998
Member
reardonb@my-deja.com wrote:
>
> Thanks Bernard! I'll try this as soon as I get home.
> My next question is, How could I have figured that out
> myself if I did not have access to this news group?

Well, that's a good question because I think I learned of this function
from this newsgroup as well...

--
Bernard Puc AETC, INC.
bpuc@va.aetc.com 1225 Jefferson Davis Highway #800
(703) 413-0500 Arlington, VA 22202
Re: realizing nonmodal widgets [message #18344 is a reply to message #18331] Tue, 21 December 1999 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Brian (reardonb@my-deja.com ) writes:

> I have a TLB widget that contains a widget button called INPUT. When
> INPUT is pressed a non modal dialog widget pops up on the screen to
> allow the user to input some data values. Currently, if you press the
> INPUT widget button on the TLB a second time, then a second INPUT dialog
> widget opens up. This is not what I want. I would like IDL to bring
> the input widget to the foreground if it is already realized and if it
> is not, then I want IDL to realize it. What is the most efficient or
> elegant way of doing this? My na�ve understanding is that I will have
> to use widget_info to determine if the widget has been realized and
> then, if so, somehow bring it to the foreground with widget_control but
> I am not sure.

Suppose that your input dialog widget is registered with XMANAGER
with a command like this:

XMANAGER, 'input_dialog_thingy', tlb, Event_Hander=....

Then all you have to do to get the behavior you want is add
this line in your widget definition module (I.e., the one
where XMANAGER is called and the widgets are defined) *before*
you create any widgets:

IF XRegistered('input_dialog_thingy') GT 0 THEN RETURN

This is how widget programs that use Common blocks protect
themselves from having multiple copies on the display at
once. :-)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: realizing nonmodal widgets [message #18346 is a reply to message #18344] Tue, 21 December 1999 00:00 Go to previous message
reardonb is currently offline  reardonb
Messages: 16
Registered: December 1999
Junior Member
Thanks Bernard! I'll try this as soon as I get home.
My next question is, How could I have figured that out
myself if I did not have access to this news group?
Thanks again!
-Brian
In article <385F95A7.D2F8C467@va.aetc.com>,
bpuc@va.aetc.com wrote:
> I believe that the XREGISTERED() function may be what you are looking
> for.
> If you put a line like this at the start of your INPUT routine,
>
> IF XREGISTERD( "INPUT" ) THEN RETURN
>
> If an input window already exists, it will be brought to the front of
> the desktop.
>
> reardonb@my-deja.com wrote:
>>
>> Hi all!
>> I have a TLB widget that contains a widget button called INPUT. When
>> INPUT is pressed a non modal dialog widget pops up on the screen to
>> allow the user to input some data values. Currently, if you press the
>> INPUT widget button on the TLB a second time, then a second INPUT dialog
>> widget opens up. This is not what I want. I would like IDL to bring
>> the input widget to the foreground if it is already realized and if it
>> is not, then I want IDL to realize it. What is the most efficient or
>> elegant way of doing this? My na�ve understanding is that I will have
>> to use widget_info to determine if the widget has been realized and
>> then, if so, somehow bring it to the foreground with widget_control but
>> I am not sure.
>
> --
> Bernard Puc AETC, INC.
> bpuc@va.aetc.com 1225 Jefferson Davis Highway #800
> (703) 413-0500 Arlington, VA 22202
>


Sent via Deja.com http://www.deja.com/
Before you buy.
Re: realizing nonmodal widgets [message #18347 is a reply to message #18344] Tue, 21 December 1999 00:00 Go to previous message
Bernard Puc is currently offline  Bernard Puc
Messages: 65
Registered: January 1998
Member
I believe that the XREGISTERED() function may be what you are looking
for.
If you put a line like this at the start of your INPUT routine,

IF XREGISTERD( "INPUT" ) THEN RETURN

If an input window already exists, it will be brought to the front of
the desktop.


reardonb@my-deja.com wrote:
>
> Hi all!
> I have a TLB widget that contains a widget button called INPUT. When
> INPUT is pressed a non modal dialog widget pops up on the screen to
> allow the user to input some data values. Currently, if you press the
> INPUT widget button on the TLB a second time, then a second INPUT dialog
> widget opens up. This is not what I want. I would like IDL to bring
> the input widget to the foreground if it is already realized and if it
> is not, then I want IDL to realize it. What is the most efficient or
> elegant way of doing this? My na�ve understanding is that I will have
> to use widget_info to determine if the widget has been realized and
> then, if so, somehow bring it to the foreground with widget_control but
> I am not sure.


--
Bernard Puc AETC, INC.
bpuc@va.aetc.com 1225 Jefferson Davis Highway #800
(703) 413-0500 Arlington, VA 22202
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: fortran .dll using ms powerstation
Next Topic: how to find the TLB of a widget

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 18:38:36 PDT 2025

Total time taken to generate the page: 0.00676 seconds