Re: Widgets and contour plots [message #42164 is a reply to message #42163] |
Tue, 11 January 2005 11:21   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
clive_cook59@hotmail.com writes:
> Thanks for the advice. My problem now is that i seem to have problems
> locating the value of my draw widget (the 2d line plot window)so that
> i can
> set that as the active window. When i configure my widget base i draw 1
> large widget and then thecontour window in the top left in a new widget
> base, followed by a second draw widget to the left in a new widget base
> (contains the 2d line plot), followed my a widget below containing test
> boxes that display the values of the data at the points of the cursor.
> I am
> getting confused as to how to obtain the values of my various draw
> widgets,
> any help would be useful.
>
> I have tried using Dave Fannings methods but i am a little confused
> with this.
The graphics window index number (the window number
you want to WSET to) is the *value* of the draw widget.
If you know the ID of the draw widget (perhaps you clicked
somewhere in the window, so the ID is in the event structure)
you can easily get the window index number:
Widget_Control, event.ID, Get_Value=wid
WSet, wid
If you want to do something in other windows, you
have to know either the draw widget ID of those other
windows, or the window index number of the other windows
in order to draw into them.
Cheers,
David
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http:/www.dfanning.com/
Phone: 970-221-0438, IDL Book Orders: 1-888-461-0155
|
|
|