X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4638eaea2d074742d81df5cfb0bdba1708dee2f8..4c53d5301b134376f49ec1296d2e4c83dae8c0a3:/wxPython/demo/Main.py diff --git a/wxPython/demo/Main.py b/wxPython/demo/Main.py index ba79bc8e44..facaf02784 100644 --- a/wxPython/demo/Main.py +++ b/wxPython/demo/Main.py @@ -261,6 +261,8 @@ try: # Some methods to make it compatible with how the wxTextCtrl is used def SetValue(self, value): + if wx.USE_UNICODE: + value = value.decode('iso8859_1') self.SetReadOnly(False) self.SetText(value) self.SetReadOnly(True) @@ -435,7 +437,7 @@ class wxPythonDemo(wx.Frame): if wx.Platform != '__WXMAC__': # setup a taskbar icon, and catch some events from it - dim = 16 # (may want to use 22 on wxGTK...) + dim = 16 # (may want to use 22 on wxGTK, but 16b looks okay too) icon = wx.IconFromBitmap( images.getMondrianImage().Scale(dim,dim).ConvertToBitmap() ) #icon = wx.Icon('bmp_source/mondrian.ico', wx.BITMAP_TYPE_ICO) @@ -736,6 +738,8 @@ class wxPythonDemo(wx.Frame): lead = text[:6] if lead != '' and lead != '': text = '
'.join(text.split('\n')) + if wx.USE_UNICODE: + text = text.decode('iso8859_1') self.ovr.SetPage(text) self.nb.SetPageText(0, name)