Re: Re: Re: Re: Toggle buttons

On Tue, May 07, 2002 at 10:43:52AM -0400, Jim Parker wrote:
When I do as you suggest I get the following runtime error  (one for each
button in the group):

Gtk-CRITICAL  **: file gtkradiobutton.c: line 167
(gtk_radio_button_set_group): assertion `!g_slist_find (group,
radio_button)' failed

Thanks anyway.

Jim Parker
---end quoted text---
Hmmm.. so it appears that gtk+ adds it to the list for you..
but, if it makes that, you have to create the first radio button outside the
loop, get it's group, and then start the loop setting the other radio's group
to the group that were got from the first created one.
It's kinda this:

radio = gtk_radio_...create ();
group = gtk_radio_...get_group (radio)
for (i = 1;...) {
  radio = gtk_radio_...create ();
  gtk_radio_...set_group (group);

Sorry, my mistake.. :)
Marcelo R Leitner <mrl netbank com br>

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