Re: buttons on exclusive base [message #12045] |
Fri, 12 June 1998 00:00  |
David Foster
Messages: 341 Registered: January 1996
|
Senior Member |
|
|
csaute3@alumni.umbc.edu wrote:
>
> I have an exclusive base created by WIDGET_BASE(/EXCLUSIVE).
> (It can only have button children and only one button can be
> set at a time.) I use
>
> WIDGET_CONTROL, button, SET_BUTTON=1
>
> to select one button on in my main routine for my default and
> the rest of the buttons are off.
>
> Question: In my event loop, how do determine which button is
> on? Is there a keyword to WIDGET_INFO?
>
> Or should I create an array with the number of elements equal
> to the number of buttons and the values equal to 1/0 if a
> button is on/off? I don't want to maintain this array every
> time a toggle button is pushed, but if it's the only way ...
>
> Cathy
I believe that if you use CW_BGROUP() to create your exclusive
button group, you can use WIDGET_CONTROL, group_base, get_value=
to get the index of the currently selected button.
Dave
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
David S. Foster Univ. of California, San Diego
Programmer/Analyst Brain Image Analysis Laboratory
foster@bial1.ucsd.edu Department of Psychiatry
(619) 622-5892 8950 Via La Jolla Drive, Suite 2240
La Jolla, CA 92037
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
|
|
|