Re: radio_button behavior with toggle_button style ?



 --- Alain D'EURVEILHER <deurveia esiee fr> wrote: > Jack Chen wrote:
> > 
> > Ha I know why you want to make that... because it looks better and
> you
> > can customize the big buttons. I just did that, and it's easy.
> Here's
> > how:
> > 
> > - Set each button to be a toggle button
> > - Create a global GtkWidget pointer for each of the buttons
> > - In the callback for the toggle button set the other buttons to go
> > "unpressed" using their global pointers.
> > - Here you go!
> > 
> > The trick is to set the pointer to button as a global instead of
> one
> > inside main(), so you can change the button's state from within
> other
> > callback functions.
> > 
> > Bye
> > 
> > Jack
> >
> Ok, Thank you Jack, but I think that the solution given by Soeren, is
> 
> more simple than yours !! :
> "
> Create the radio buttons as usual, then use
> 
>     gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (radio_button),
> FALSE);
> 
> to make the radio buttons draw like regular buttons.
> "
> Thx anyway ;-)
> 
> -- 
> 
> Alain.

Interesting! I'll try his/her solution. Thanks.

Jack

______________________________________________________________________ 
Post your free ad now! http://personals.yahoo.ca



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