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 #28746 is a reply to message #28743] Wed, 09 January 2002 11:30 Go to previous messageGo to previous message
marc schellens[1] is currently offline  marc schellens[1]
Messages: 183
Registered: January 2000
Senior Member
"Pavel A. Romashkin" wrote:
>
> I had a case when I kept on adding checkboxes a few times while
> developing a program. I didn't want to go and change the State structure
> all the time, so I wrote a small program called CHECKBOX. You can find
> it here:
> http://spot.colorado.edu/~romashki/idl/checkbox.pro
> All you need is to set up a long integer somewhere (be it State
> structure or Uvalue of one of the widgets already referred to in State
> structure, for easy retrieving). Then, in the event code for the
> checkbox, you call the CHECKBOX with event.select as ACTION keyword argument.
> CHECKBOX program then will set an appropriate bit of the Long you
> created, and the state of that bit is the same as the state of that
> checkbox. Later, you can call
> status = checkbox(Long_var, bit_number, /get)
> and get status of checkbox.
> Think of the space savings - you can store state of some 64 checkboxes
> in just 8 bytes!
> Pavel

Actually I doubt that this is a good idea.
Especailly in IDL.
If you have megabytes of data, ok, but just for
checkboxes, the code you add to the running
program is *much* larger that the few bytes you saved.
(Unless you have thousands of checkboxes).

To Lisa:
if you create your checkbox with
id=cw_bgroup(tlb,['b1','b2'...],/NONEXCLUSIVE)
you can get the status of the buttons anytime with
widget_control,id,GET_VALUE=arr
where arr is an intarr set to 1 for every selected button, 0 for
nonselected.

cheers,
marc
[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: Fri Oct 10 00:37:51 PDT 2025

Total time taken to generate the page: 0.00626 seconds