# fill file menu
self.menFile.AppendSubMenu(self.submenLang, "a", "b")
self.menFile.AppendSeparator()
self.menFile.AppendItem(self.menExit)
# create help menu
self.menHelp = wx.Menu()
self.menAbout = wx.MenuItem(self.menHelp, wx.ID_ANY, " ", kind = wx.ITEM_NORMAL)
self.menHelp.AppendItem(self.menAbout)
# fill & set menubar
self.menubar.Append(self.menFile, _("&File"))
self.MLFrm_menubar.Append(self.menHelp, _("&Help"))
self.SetMenuBar(self.MLFrm_menubar)
because of working with internationalization (gettext) i wont to reset the
labels and textes after changing the language in the submenu. For the simple
MenuItems i just make:
self.menExit.SetText(_("E&xit"))
for the labels of the top level menus (File and Help) i made:
self.menubar.SetMenuLabel(0, _("&File"))
but how can i reset the label of my submenu submenLang??
because of working with internationalization (gettext) i wont to reset the labels and textes after changing the language in the submenu. For the simple MenuItems i just make:
self.menExit.SetText(_("E&xit"))
for the labels of the top level menus (File and Help) i made:
self.menubar.SetMenuLabel(0, _("&File"))
but how can i reset the label of my submenu submenLang??
A wx.MenuItem will have been returned when you called AppendSubMenu, so you can use that to get the access you need.
OTOH, I think it would be easier to just recreate the whole menubar and replace the existing one.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!