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

Home » Public Forums » archive » Re: Getting checkbox value
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: Getting checkbox value [message #28755 is a reply to message #28750] Tue, 08 January 2002 10:34 Go to previous messageGo to previous message
Paul van Delst is currently offline  Paul van Delst
Messages: 364
Registered: March 1997
Senior Member
Lisa Gandy wrote:
>
> I am trying to get the value of a checkbox...meaning I would like to
> know if the checkbox is selected at a certain time. I have looked
> through the references under widget_control and widget_info but
> neither of these keywords seem to return if a checkbox button has been
> selected or not. Did I overlook something?

I usually do this by setting a "selected" field in my widget info structure when the
checkbox/radio button is set/unset. Then if I want to know the value at some arbitrary time
(not relying on an event, say) I just check the corresponding value of the info structure. If
you have a whole bunch of (nonexclusive) buttons any of which may or may not be set at any
time, use an array to store the "select" status of each one (e.g. 0=unset, 1=set or whatever).
Then it's easy to find which buttons are set (or not) using a WHERE on the select status array,
the index result of which you can then apply to the button id array (which I also save in the
info structure) if you, say, wanted to clear or set all the checkboxes/buttons.

Simple minded, but it works pretty well.

paulv

--
Paul van Delst Religious and cultural
CIMSS @ NOAA/NCEP purity is a fundamentalist
Ph: (301)763-8000 x7274 fantasy
Fax:(301)763-8545 V.S.Naipaul
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: RGB image
Next Topic: object widgets

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

Current Time: Sat Oct 11 03:29:27 PDT 2025

Total time taken to generate the page: 1.04058 seconds