Hrrr.. spaces gets lost in the quote....import wx
class MyFrame(wx.Frame):
def __init__(self, parent, id, title):
wx.Frame.__init__(self, parent, id, title, wx.DefaultPosition, wx.Size(300, 200),wx.FRAME_NO_TASKBAR)
panel = wx.Panel(self, -1,(-1, -1),wx.Size(300, 200))
box = wx.BoxSizer(wx.VERTICAL)
font=wx.Font(21,wx.DEFAULT,wx.NORMAL,wx.BOLD,False)
text='Prima eilut─ù'
text2="Antra eilut─ù"
Ob=wx.StaticText(panel, -1, text)
Ob.SetFont(font)
Ob2=wx.StaticText(panel, -1, text2)
Ob2.SetFont(font)
Ob2.SetForegroundColour('#FFFFFF')
panel.SetBackgroundColour('#009999')
box.Add(Ob,0,wx.LEFT|wx.TOP,10)
box.Add(Ob2,0,wx.LEFT|wx.TOP,10)
panel.SetSizer(box)
panel.Bind(wx.EVT_KEY_DOWN, self.OnKeyDown)
panel.SetFocus()
self.Centre()
def OnKeyDown(self, event):
keycode = event.GetKeyCode()
if keycode == wx.WXK_ESCAPE:
self.Close()
event.Skip()
class MyApp(wx.App):
def OnInit(self):
frame = MyFrame(None, -1, 'Mano App')
frame.Show(True)
return True
app = MyApp(0)
app.MainLoop()
What did I wrong?