I have a problem a need linking gtk_radiobutton with a gtk_button
- From: javiercmx correo unam mx
- To: gtk-app-devel-list gnome org
- Subject: I have a problem a need linking gtk_radiobutton with a gtk_button
- Date: Mon, 08 Jul 2002 16:33:26 -0500 (CDT)
Hi list thanks Olivier
I have the following
In this part I create a group of radiobutton:
button = gtk_radio_button_new_with_label (NULL, "USER");
gtk_signal_connect(GTK_OBJECT(button), "toggled",
GTK_SIGNAL_FUNC(op_user), NULL);
gtk_box_pack_start (GTK_BOX (box2), button, FALSE, FALSE, 0);
gtk_widget_show(button);
group = gtk_radio_button_group (GTK_RADIO_BUTTON (button));
button = gtk_radio_button_new_with_label(group, "DATA");
gtk_signal_connect(GTK_OBJECT(button), "toggled",
GTK_SIGNAL_FUNC(op_data), NULL);
gtk_box_pack_start (GTK_BOX (box2), button, FALSE, FALSE, 0);
gtk_widget_show(button);
...
...
In this part I create a new button:
button =gtk_button_new_with_label("OK");
I use the following:
gtk_signal_connect(GTK_OBJECT(button), "clicked",
GTK_SIGNAL_FUNC(op_user), NULL);
but when compiling appears this message:
invalid cast from `GtkButton' to `GtkToggleButton'
I need the following:
If I prees the radiobutton "USER" and I press the button "OK" call the
function op_user, but if I press the radiobutton "DATA" and I press the
button "OK" call the function op_data
Any Ideas?
-------------------------------------------------
Obtén tu correo en www.correo.unam.mx
UNAMonos Comunicándonos
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]