Re: RadioButton question



On Mon, Dec 18, 2006 at 11:48:13AM -0600, Steven Boyls wrote:
How do you determine which radio button is selected?

1. By knowing the initial state, connecting to button
signals and updating the state immediately so that it never
gets out of sync.  If you respond to the selection
immediately somehow, you have to do this anyway.

2a. By iterating over the buttons checing the state.

2b. With some convenience functions you wrote for your
common use cases such as
http://gwyddion.svn.sourceforge.net/viewvc/gwyddion/trunk/gwyddion/libgwydgets/gwyradiobuttons.c?view=markup
because who cares about the widgets anyway?  The widgets
just represent some choices and you want to say `select
option Foo' or `which option is selected?', this is what you
mean, not `select this button widget', this is just the
mechanism.

Yeti


--
Whatever.



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