Re: radio_button behavior with toggle_button style ?

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

 



 --- Olexiy Avramchenko <olexiy@xxxxxxxxxxxx> wrote: > Petr Tomasek
wrote:
> 
> >On Sat, Jan 10, 2004 at 08:38:09AM +0100, Alain D'EURVEILHER wrote:
> >  
> >
> >>Hi,
> >>
> >>Is it possible to make a group of toggle button, but behavioring as
> the 
> >>radiobuttons ??
> >>
> >>Here it is... : have for example 3 toggle_button and, pressing one
> down 
> >>release (up) the other ones...
> >>
> >>I've tried to make it, but i didn't know how... If sb have some
> clue on 
> >>that... ;-)
> >>
> >>Thx.
> >>
> >>AlaiN.
> >>    


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

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

gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux