Re: Parent Child relationship in IDL [message #39812] |
Wed, 23 June 2004 05:05  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
IDLmastertobe writes:
> I just implemented a .pro program that displays an image in its draw
> window. The program is able to draw a box on top of this image where the
> area of the image enclosed by the box will be zoomed in on another window.
> Next, the program takes the image enclosed by the box and passes it on as
> a parameter to itself using the 'CALL_PROCEDURE' method.
>
> Essentially, I now have two of the same .pro programs running, where the
> first window has the original image, and the second window has the zoomed
> image.
>
> My problem is that I would like to redraw the box on the first window, and
> output the zoomed image to that same second window. However, the program
> displays the image enclosed by the box on a third window. How can I
> construct a relationship between the parent and child window?
You don't need a relationship. You just need to know what
window you are drawing into, an indisputable requirement
in *every* widget program that uses draw widgets!
Here is the rule: Don't draw graphics unless you know
*exactly* where they are going to show up. :-)
Have a look at ZIMAGE. It does, uh, more or less, what
you are trying to do:
http://www.dfanning.com/programs/zimage.pro
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|