Re: Getting state of a non-exclusive button (checkbox) widget [message #70633] |
Tue, 27 April 2010 02:44 |
The Countertony
Messages: 2 Registered: April 2010
|
Junior Member |
|
|
On Apr 26, 1:12 pm, David Fanning <n...@dfanning.com> wrote:
> The Countertony writes:
>> It's the if checkbox.status... line that I don't know how to phrase in
>> IDL - trouble is, all the references to event-handling of buttons I've
>> been able to find are for normal buttons, where you don't actually
>> need to know the state, just the fact that the button's been clicked.
>
>> Anyone able to suggest a solution?
>
> Use Widget_Info with the checkbox button's ID to see if
> the button is "set" or not:
>
> checkboxstatus = Widget_Info(checkbuttonID, /BUTTON_SET)
>
> Cheers,
>
> David
Thanks - that's what I needed!
Tony
|
|
|
Re: Getting state of a non-exclusive button (checkbox) widget [message #70650 is a reply to message #70633] |
Mon, 26 April 2010 05:12  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
The Countertony writes:
> It's the if checkbox.status... line that I don't know how to phrase in
> IDL - trouble is, all the references to event-handling of buttons I've
> been able to find are for normal buttons, where you don't actually
> need to know the state, just the fact that the button's been clicked.
>
> Anyone able to suggest a solution?
Use Widget_Info with the checkbox button's ID to see if
the button is "set" or not:
checkboxstatus = Widget_Info(checkbuttonID, /BUTTON_SET)
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.")
|
|
|