ich versuche gerade wxPython zu lernen mit dem tut: http://www.zetcode.com/wxpython/ <- ich finds sogar sehr gut, jetzt zu meinem Problem: immer wenn ein Beispielcode mit Toolbar drankommt, blinkt kurz ein weißes Fenster auf und das wars, jetzt ist in dem tut eine einzelne Toolbar vorgekommen, habs versucht, das selbe, hier der code:
Code: Alles auswählen
#!/usr/bin/python
# simpletoolbar.py
import wx
class SimpleToolbar(wx.Frame):
def __init__(self, parent, id, title):
wx.Frame.__init__(self, parent, id, title, size=(300, 200))
toolbar = self.CreateToolBar()
toolbar.AddLabelTool(wx.ID_EXIT, '', wx.Bitmap('../icons/exit.png'))
toolbar.Realize()
self.Bind(wx.EVT_TOOL, self.OnExit, id=wx.ID_EXIT)
self.Centre()
self.Show(True)
def OnExit(self, event):
self.Close()
app = wx.App()
SimpleToolbar(None, -1, 'simple toolbar')
app.MainLoop()
und es kommt kein Fehler nur das kurz aufblinkende weiße Fenster das wars
hoffentlich könnt ihr mir helfen
mfg