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

Home » Public Forums » archive » Re: Question about selecting images from Draw Widgets
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Question about selecting images from Draw Widgets [message #53055 is a reply to message #53052] Fri, 16 March 2007 14:01 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
gearoid.k@gmail.com writes:

> I am designing GUI, I have multiple draw widgets on screen at one
> time. I am able to select the desired widget and find its ID but
> cannot get access to the image that it is showing. For example, when a
> user clicks on a draw widget, it takes that image and displays it in a
> larger window. I imagine the code might look something like this:
>
> I am aware I can set the u_value to the image but this does not work
> if I wish to use a few different images.
>
> Any help would be greatly appreciated.

Normally, ALL the information you need to run your program
(e.g., Draw widget IDs, images, or pointers to images, etc.,
etc., etc.) is stored in a structure in the user value of
the top-level base, where it is easily accessible to
all the event handler modules that require the information.
(Sometime this structure is *itself* stored in a pointer
so it is easier to carry around with out making copies of
the data all the time.)

If you write your programs this way, all information is
immediately at your fingertips.

Another way you could write your program is to use the
UVALUE of the draw widget to store the image that is
displayed there. Then, if you can find the draw widget,
you can find the image. But this method can get messy
very quickly and I do NOT recommend it.

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Lots of files
Next Topic: random musings

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

Current Time: Sun Oct 12 10:42:49 PDT 2025

Total time taken to generate the page: 0.72248 seconds