Re: always widget! [message #37426] |
Thu, 18 December 2003 04:59  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Roberto writes:
> How could I know if a widget is active?
> In my widget I have a widget_Text (text1) and two widget_button (butto1, button2).
> Button1 is used to activate or disactivate text1. I use this code:
> [.....]
> WIDGET_CONTROL, event.id, GET_UVALUE = eventval
> CASE eventval OF
> "button1" : BEGIN
> if (event.select eq 1) then begin
> widget_control, text1, sensitive = 0
> endif else begin
> widget_control, text1, sensitive = 1
> endelse
> END
> [......]
>
> by button2 I want to know if text1 is active or not.
> How can I do?
You can use WIDGET_INFO:
Print, WIDGET_INFO(text2, /Sensitive)
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
|
|
|
Re: always widget! [message #37513 is a reply to message #37426] |
Fri, 19 December 2003 00:42  |
templebar
Messages: 6 Registered: October 2003
|
Junior Member |
|
|
Thank you David!
Keyword SENSITIVE is not allowed in WIDGET_INFO function but I have
resolved equally!
Good festivities!
Roberto
|
|
|