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

Home » Public Forums » archive » 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
widgets [message #21375] Fri, 18 August 2000 00:00 Go to next message
Stuart Colley is currently offline  Stuart Colley
Messages: 17
Registered: February 2000
Junior Member
I've not really used widgets before, any suggestions on how the following
task might be tackled would be appreciated. What I'd like to do is
display an image, stored in an array size x by y, using say tvscl, then
click on part of the image with the mouse and get x, y, and the value of
the array at that location.

Are there any routine(s) suited to this sort of task?
cheers,
Stu
Re: widget [message #22357 is a reply to message #21375] Mon, 06 November 2000 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Jean Marc Delvit (delvit@onecert.fr) writes:

> How to get a value from a widget box and not from the prompt in IDL?

You need to make what I call a "modal dialog widget".
The main trick (there are several) is to store the information
you want to return somewhere outside the program itself.
This is almost always a pointer location.

The program is written as a function and is written so
that the program stops or blocks at the XMANAGER call
until the widgets are destroyed. At that time the information
collected and stored in the pointer location is retrieved
and returned to the user as the result of the function.

There is an entire chapter of my book devoted to this
subject (if you can find one), or you can look at any
number of programs on my web page. Perhaps a good place
to start is with PICKCOLORNAME:

IDL> color = PickColorName('White')

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: widget [message #22358 is a reply to message #21375] Mon, 06 November 2000 00:00 Go to previous message
Pavel A. Romashkin is currently offline  Pavel A. Romashkin
Messages: 531
Registered: November 2000
Senior Member
Write a widget program.

For a more detailed answer, could you try to be more specific about what
you want to do?
Cheers,
Pavel

Jean Marc Delvit wrote:
>
> How to get a value from a widget box and not from the prompt in IDL?
>
> thanks
>
> JMD
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: MEM spectral analysis
Next Topic: Slow Time Test in IDL 5.4

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

Current Time: Sat Oct 11 10:26:37 PDT 2025

Total time taken to generate the page: 1.76129 seconds