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

Home » Public Forums » archive » Re: Problem with /sensitive
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: Problem with /sensitive [message #29510] Sat, 23 February 2002 08:30 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning (david@dfanning.com) writes:

> Here is a little test program that seems to work
> perfectly on both IDL 5.4 and IDL 5.5 on Windows 2000.
> I'm thinking this problem may have more to do with how
> the widgets are created with the GUI Builder than with
> how IDL works.

I forgot about the slider. Here is an updated program
with a slider in it, too. All appears to work as expected.

Cheers,

David

Pro test_sensitive_event, event
Widget_Control, event.top, get_Uvalue=info
Widget_Control, event.id, Get_Value=buttonValue
IF tag_names(event, /structure_name) EQ 'WIDGET_SLIDER' THEN BEGIN
Print, event.value
RETURN
ENDIF
IF event.select NE 1 THEN RETURN
CASE buttonValue of
'Make Sensitive': BEGIN
Widget_Control, info.base, Sensitive=1
Widget_Control, info.base2, Sensitive=1
END
'Make Insensitive': BEGIN
Widget_Control, info.base, Sensitive=0
Widget_Control, info.base2, Sensitive=0
END
ELSE: Print, buttonValue

ENDCASE
END

PRO test_sensitive
tlb = Widget_Base(col=1)
base = Widget_Base(tlb,col=1, /exclusive, sensitive=0)
button = Widget_button(base, Value='Button One Test')
button = Widget_button(base, Value='Button Two Test')
Widget_Control, button, Set_Button=1
base2 = Widget_Base(tlb, row=1, sensitive = 0)
slider = Widget_Slider(base2, min=0, max=10, value=5)
makeit = Widget_Button(tlb, Value='Make Sensitive')
makeit = Widget_Button(tlb, Value='Make Insensitive')
Widget_control, tlb, /REalize, Set_UValue={base:base, base2:base2}
XManager, 'test_sensitive', tlb, /No_block
END
--
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
[Message index]
 
Read Message
Read Message
Previous Topic: Problem with /sensitive
Next Topic: Retain=4??

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

Current Time: Thu Oct 09 10:08:24 PDT 2025

Total time taken to generate the page: 0.88223 seconds