Re: state = WIDGET_INFO( button, /BUTTON_SELECT ) [message #10490 is a reply to message #10485] |
Wed, 10 December 1997 00:00   |
David Foster
Messages: 341 Registered: January 1996
|
Senior Member |
|
|
Alex Schuster wrote:
>
> Hi!
>
> WIDGET_INFO does not know this keyword. I think it should, what about
> you? As I see it there is no possibility to find out whether a
> nonexclusive button is selected or not.
>
> Okay, this is not really a problem. I either use CW_BGROUP, or I assign
> an event handler, and whenever the button is pressed / released, I store
> event.select in the widget's uvalue. But shouldn't this be done easier?
If you don't want to use CW_BGROUP and widget_control, GET_VALUE=,
it's probably easier to just maintain toggle flags for the state of
each button, and update the flags in your event handler. I usually
use these flags for other purposes anyway.
> And did anyone yet need WIDGET_CONTROL, GET_VALUE to get the _text_ of a
> button?
Uh, no. Usually the program already knows what the buttons say!
>
> Or am I, as so often, just missing something?
>
No, just complaining. ;-)
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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
|
|
|