Re: Getting uname [message #28634] |
Sat, 29 December 2001 14:13 |
Xiangyun Qiu
Messages: 6 Registered: November 2001
|
Junior Member |
|
|
Lisa Gandy wrote:
> I have a gui in IDL and I understand how to set uvalues of widgets and
> then get the uvalue when an event is triggered. However I am not
> familiar with how to get the uname when an event is triggered. For
> example usually i would use this command to get the uvalue....
>
> widget_control,event.id,get_uvalue = uval
>
> What is the command to get a uname?
>
> - Lisa Gandy
Maybe, uname = Widget_Info( Event.id, /UNAME) is what you meant.
Xiangyun
-
Attachment: qiuxiang.vcf
(Size: 0.22KB, Downloaded 76 times)
|
|
|
Re: Getting uname [message #28644 is a reply to message #28634] |
Thu, 27 December 2001 11:18  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Lisa Gandy (redlmg98@hotmail.com) writes:
>
> I have a gui in IDL and I understand how to set uvalues of widgets and
> then get the uvalue when an event is triggered. However I am not
> familiar with how to get the uname when an event is triggered. For
> example usually i would use this command to get the uvalue....
>
> widget_control,event.id,get_uvalue = uval
>
> What is the command to get a uname?
If you are using UNAMES, you have to know what name
you are looking for. For example, suppose you had
assigned a slider the uname "RED_SLIDER". Then you would
find the ID of the slider in an event handler like this:
sliderID = Widget_Info(event.top, Find_By_UName='RED_SLIDER')
Cheers,
David
--
David W. Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|