casting Gtk::UIManager::get_widget()
- From: Sergio Perticone <g4ll0ws gmail com>
- To: gtkmm mailing-list <gtkmm-list gnome org>
- Subject: casting Gtk::UIManager::get_widget()
- Date: Sat, 28 Apr 2007 19:38:48 +0200
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.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]