[wxPython-users] LCD vs CRT Monitors Issues (!)

Alexei Vinidiktov alexei.vinidiktov at gmail.com
Thu Nov 1 08:25:38 PDT 2007


Andrea Gavana wrote:

> 
> Thanks to Tim Morton, who was able to track down this CRT vs LCD
> monitors, now FlatMenu should work correctly on both monitor types.
> Curiously, just replacing this line:
> 
> fnt = wx.SystemSettings_GetFont(wx.SYS_DEFAULT_GUI_FONT)
> 
> with this line:
> 
> fnt = wx.SystemSettings_GetFont(wx.SYS_ANSI_VAR_FONT)
> 
> Fixed the issue. I have no idea why, but it works. I can't test it on
> Linux, but I don't see why it shouldn't work there too...
> Also, I have finally patched ToasterBox with the modifications sent by
> Luca Politti. Sorry for the long absence, the worst period at work
> should be over :-D
> 
> As usual, you can find the updated sources here:
> 
> http://xoomer.alice.it/infinity77/main/freeware.html
> 

Does FlatMenu support unicode strings?

I tried to use a unicode string for a menu item and I got this error:

Traceback (most recent call last):
   File "C:\Documents and Settings\Alexei\Desktop\FlatMenu\FlatMenu\FlatMenu
Demo.py", line 538, in <module>
     main()
   File "C:\Documents and Settings\Alexei\Desktop\FlatMenu\FlatMenu\FlatMenu
Demo.py", line 532, in main
     frame = FlatMenuDemo(None, -1)
   File "C:\Documents and Settings\Alexei\Desktop\FlatMenu\FlatMenu\FlatMenu
Demo.py", line 145, in __init__
     self.CreateMenu()
   File "C:\Documents and Settings\Alexei\Desktop\FlatMenu\FlatMenu\FlatMenu
Demo.py", line 288, in CreateMenu
     self._mb.Append(fileMenu, u"Юникод")
   File "C:\Documents and Settings\Alexei\Desktop\FlatMenu\FlatMenu\FlatMenu
.py", line 433, in Append
     return self.Insert(len(self._items), menu, title)
   File "C:\Documents and Settings\Alexei\Desktop\FlatMenu\FlatMenu\FlatMenu
.py", line 1174, in Insert
     self._items.insert(pos, MenuEntryInfo(title, menu))
   File "C:\Documents and Settings\Alexei\Desktop\FlatMenu\FlatMenu\FlatMenu
.py", line 296, in __init__
     self._title = titleOrMenu._title
AttributeError: 'unicode' object has no attribute '_title'


-- 
Alexei Vinidiktov





More information about the wxpython-users mailing list