Hi,
I've a menu with a checkbutton, how can I check if is it active?

I've tried this way:

void Window::f()
{
        Gtk::CheckButton* pCheck = 
static_cast<Gtk::CheckButton*>(refUIManager->get_widget("/Where/Is/CheckButton"));

        if(pCheck && pCheck->get_active()) {
               // ...
        }
}

But at runtime I get this message:
Gtk-CRITICAL **: gtk_toggle_button_get_active: assertion 
`GTK_IS_TOGGLE_BUTTON (toggle_button)' failed

I've also tried dynamic_cast<>() but `pCheck' becomes NULL.

Thanks,

s.
_______________________________________________
gtkmm-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gtkmm-list

Reply via email to