Re: radio buttons help !



samuel.berthelot wrote:

Hi,
I'm still having problem with these radio buttons ... Does anyone know what's wrong in the following code ? The problem is that the middle button doesn't work. when it's pressed once then it cannot be realease anymore...

radiobutton3 = gtk_radio_button_new_with_label (NULL, "FRONT");
gtk_widget_show (radiobutton3);
gtk_box_pack_start (GTK_BOX (vbox26), radiobutton3, TRUE, FALSE, 0);
        
radiobutton3_group = gtk_radio_button_group ( (GTK_RADIO_BUTTON( radiobutton3 )));
        
radiobutton4 = gtk_radio_button_new_with_label (radiobutton3_group, "BACK");
gtk_widget_show (radiobutton4);
gtk_box_pack_start (GTK_BOX (vbox26), radiobutton4, TRUE, FALSE, 0);
        
radiobutton5 = gtk_radio_button_new_with_label (radiobutton3_group,
"FRONT_AND_BACK");
gtk_widget_show (radiobutton5);
gtk_box_pack_start (GTK_BOX (vbox26), radiobutton5, TRUE, FALSE, 0);

I did point this out before. After each time you add a new radio button to a group you have to recall gtk_radio_button_group() again to get the group pointer because it is a pointer to a GSList, and this pointer changes each time you add a new radio button to the group.

Regards,

Jeff Franks.



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