Re: New problem, broken toggle button code.




Leeman Strout <leeman@mail2.nai.net> writes:

> [1  <text/plain; US-ASCII (7bit)>]
> On Wed, 4 Mar 1998, Tim Janik wrote:
> 
> > On Wed, 4 Mar 1998, Leeman Strout wrote:
> > 
> > > 
> > > When I set an active toggle button to being insensitive, the button pops
> > > back out to being inactive.  My problem with that is I have 2 toggle
> > > buttons setup for radio behaviour, and to help enforce that radio
> > > behaviour I set the active button insensitive.  Everything still works,
> > > but the active button no longer looks active.  I haven't checked yet
> > > whether the actual (button)->active value is actually reset or not tho.
> > > 
> 
> > hm, though i don't really get the difference you are mentioning, you
> > might just want to use ordinary radio buttons and do a
> > gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (radio_button), FALSE);
> > on each of them.
> 
> Ok in answer to 'you might...'  I didn't to begin with because I want a
> full size button, not a little diamond radio button.  And lastly I'll
> attach a sample program to show you what I am talking about.

Try what Tim suggested. It will produce the effect you want.
(mode = TRUE => check/radio button indicator
        FALSE => normal full sized button)

> And lastly, after you get what I'm talking about... can we restore the old
> behaviour?  (An active but insensitive toggle still looks active, but also
> insensitive)

Not easily. There were some gaping inconsistancies in the way things
used to be handled which caused some strange effects. Currently,
the appearance of a widget is determined solely by widget->state,
which can be GTK_STATE_ACTIVE or GTK_STATE_INSENSITIVE, but
not both.

Regards,
                                        Owen



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