Re: radio_button behavior with toggle_button style ?
- From: Jack Chen <jacks_small_world yahoo com>
- To: gtk-list gnome org
- Subject: Re: radio_button behavior with toggle_button style ?
- Date: Mon, 12 Jan 2004 13:43:51 -0500 (EST)
--- Olexiy Avramchenko <olexiy irtech cn ua> 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]