how can i retrieve a submenu item to set it non sensitive??



Hi,
I've a menu bar with three menu (File, Edit, Information), all with submenus.
I want to retrieve a menuItem of the Edit menu to change the sensitive
state at runtime...
The menubar is public.
This is what i'm trying:
	Gtk::Menu_Helpers::MenuList::iterator it_menu;
	Gtk::Menu_Helpers::MenuList& ml = this->menubar1->items();
	for (it_menu=ml.begin(); it_menu!=ml.end(); ++it_menu) {
// in this way i got one of the three menus, right?????
Gtk::MenuItem* item = dynamic_cast<Gtk::MenuItem *>(&*it_menu);
			if (item==0)
				continue;
			else {
// why this print "gtk__MenuItem", and not the name of the item???
				std::cout<<item->get_name()<<"\n";
			}
	}

How can I retrive an item in the submenu??? is it possible with the
name (string)????

--
Ciao da
N poleone (ICQ# 266220356; MSN Messenger: napoleone1981 yahoo it)
"Le battaglie si vincono con gli uomini che si hanno, non con quelli che
si vorrebbero" (Napoleone Bonaparte)
"Le cose che possiedi prima o poi ti possiedono..." (Fight Club)
"Le donne possono avere bambini...gli uomini computers" (Anonimo)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]