[pygtk] Adding and deleting items from a menu

2009-08-17 Thread Fabrice DELENTE
Hello. I'm trying to dynamically add and delete items from a drop-down menu-bar. My code is: self.wTree=gtk.glade.XML(gladeFile,window1) self.menuFichier=self.wTree.get_widget(menu1) entree=gtk.MenuItem(some text) self.menuFichier.insert(entree,5) and I expect to see some text as the 6th entry

Re: [pygtk] Adding and deleting items from a menu

2009-08-17 Thread Fabrice DELENTE
This is not a real answer to your question, but I have been fighting with menus till I took the time to read UIManager Interfaces that really makes working with menus much simpler and more reasonable. I'll look into that, thanks. Is it compatible with glade (because I designed my interface

Re: [pygtk] Adding and deleting items from a menu

2009-08-17 Thread saeed
Any Widget needs to be called show() to be shown and updated in the GUI. For a Container, you can also use show_all() method to show all of it's children. Then in this case, you need call show() for the new menu item, or call show_all() for the menu itself. You can see all methods and features