[wxpython] change the language of a menubar

Jan-Heiner Dreschhoff hdreschhoff at gmail.com
Fri Jun 5 14:10:38 EDT 2009


Hi Guys,

i am new to wxpython an i have trouble with the menubar.
i tried to write a dynamic menubar that can read the itemnames from an
sqlite3 database, so i can change the language very easy.
like this.


def MakeMenuBar(self):
    self.dbCursor.execute("SELECT " + self.lang[self.langSelect] +" FROM
menu")
    self.menuwords = self.dbCursor.fetchall()
    menu = wx.Menu()        ##Filemenu
    item = menu.Append(ID_CONNECT, "%s" %self.menuwords[3])
    .
    .
    .

this works fine, when i draw the menu for the first time, when i want to
change language in runtime, i can not get the menu to redraw.
can someone help me out on this one?
thanks
heiner
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20090605/2122d0d0/attachment.html>


More information about the Python-list mailing list