Problem with CheckMenuItem::set_inconsistent
- From: John Spray <jcspray icculus org>
- To: gtkmm-list gnome org
- Subject: Problem with CheckMenuItem::set_inconsistent
- Date: Fri, 22 Dec 2006 20:12:06 +0000
I'm trying to create a CheckMenuItem with the 'inconsistent' state. The
following code snippet pops up the menu with the item, but the item
appears in the inactive state, as if set_inconsistent hadn't been
called. Waiting until after popup() to call set_inconsistent (so that
the checkmenuitem is realized) makes no difference. The same sort of
thing on a usual CheckButton works fine.
Suggestions?
John
void popup ()
{
Gtk::Menu *menu = Gtk::manage(new Gtk::Menu);
Gtk::CheckMenuItem *item = Gtk::manage(new Gtk::CheckMenuItem("Foo"));
item->set_inconsistent (true);
menu->append (*item);
menu->show_all ();
menu->popup (0, 0);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]