Enable/Disable GTk CheckButton
How can i enable/disable a GtkCheckButton ??
i was trying with this Code:
do{ Code:
(gyrus:20019): GLib-GObject-WARNING **: invalid cast from `GtkCheckButton' to `GtkCheckMenuItem' So anyone can tell me how it's really supposed to be done??? Thank you.. |
Try:
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbutton_l)); You see, GtkCheckMenuItem is a different class to GtkCheckButton (one is a tick box, one is a menu item), and you are attempting to typecast between them which is invalid, hence the assertions. GtkCheckButton doesn't have its own way to toggle on and off, but it inherits from GtkToggleButton which does, hence you need gtk_toggle_button_* stuff. Hope that helps |
thank you.
|
All times are GMT -5. The time now is 03:44 PM. |