« Return to Thread: RadioToolButton

Re: RadioToolButton

by Daniel Elstner :: Rate this Message:

Reply to Author | View in Thread

Am Freitag, den 19.06.2009, 17:07 -0700 schrieb apoapsis:

> > * Use get_group() to retrieve this group and pass it to other radio
> > buttons to assign
> > * them to this group.
>
> I've given the suggested work-around a try, and have run into a slightly
> different problem.

The code suggested in this thread is wrong because it called get_group()
more than once.  I also had a look at the example, and it still seems to
be broken as well.

> Here's the code I'm working from.  If anyone can see what I'm doing wrong
> that'd be great.  ty
[...]
>     m_center = new Gtk::RadioToolButton( m_group, Gtk::Stock::JUSTIFY_CENTER);

Try removing the m_group argument to the constructor.

>     m_group = m_center->get_group();

This gets the group from the first radio button...

>     m_left = new Gtk::RadioToolButton( m_group, Gtk::Stock::JUSTIFY_LEFT );
>     m_right = new Gtk::RadioToolButton( m_group, Gtk::Stock::JUSTIFY_RIGHT);

...and assigns the other radio buttons to the same group.

--Daniel


_______________________________________________
gtkmm-list mailing list
gtkmm-list@...
http://mail.gnome.org/mailman/listinfo/gtkmm-list

 « Return to Thread: RadioToolButton