Re: How to exchange data in multi-top-level base widgets? [message #71653] |
Tue, 06 July 2010 08:26 |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
deerlux writes:
> I'm tring to write a program with multi-windows. The main window is use
> to display the main GUI, and the anthor windows used to input
> parameters. The user data is loss when the child windows is destroyed.
> How can I transfer the data from child window to main window when the
> child window is destroyed?
Typically the "parameter" window is written as a pop-up
dialog widget.
http://www.dfanning.com/widget_tips/popup.html
Such a dialog is a blocking widget, written as a function
that when it is destroyed returns the pertinent information
to the caller of the dialog (i.e., your main GUI).
Other methods of communication are possible, too. For
example, you can "send" an event containing information
to your main GUI, using WIDGET_CONTROL and the SEND_EVENT
keyword. Or, you could use Catalyst Widgets. Such widgets
are objects and are designed with "message handling" build
into them. One widget registers interest in another widget,
and is "notified" if something interesting happens to that
widget.
But I would think in your case a pop-up dialog is the
easiest way to go.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thue. ("Perhaps thos speakest truth.")
|
|
|