[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Widget Buttons - Radio and Checkbox control



In article <MPG.13301560857f17af989a7f@news.frii.com>,
	davidf@dfanning.com (David Fanning) writes:
> Oliver Smith (osmith@dera.gov.uk) writes:
> 
>> I'm currently writing some code in IDL 5.3 that utilises two groups of
>> widget buttons, 2 Check boxes and 4 Radio Buttons. I would like to be able
>> to set both check boxes and one of the radio buttons to be 'on' when the
>> program starts, and possibly to reset them at a later stage of program
>> execution after user intervention.
>> 
>> Can anybody help me with this? I can't find any relevant information in the
>> IDL help.
> 
> Widget_Control, buttonID, Set_Button=1


Unfortunately I don't think there is any way to query
the state of exclusive or non-exclusive buttons:

    WIDGET_CONTROL, buttonID, GET_BUTTON = state
    % Keyword GET_BUTTON not allowed in call to: WIDGET_CONTROL
    % Execution halted at:  $MAIN$ 

You will have to store the current state and drag it
around in your program :-(
 
       
-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Robert S. Mallozzi                                       256-544-0887
                                                      Mail Code SD 50
http://gammaray.msfc.nasa.gov/           Marshall Space Flight Center 
http://cspar.uah.edu/~mallozzir/                 Huntsville, AL 35812
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~