Code: Alles auswählen
import wx
#---------------------------------------------------------------------------
class MySplitter(wx.SplitterWindow):
def __init__(self, parent, ID):
wx.SplitterWindow.__init__(self, parent, ID,
style = wx.SP_3D
#| wx.SP_LIVE_UPDATE
)
#---------------------------------------------------------------------------
def runTest(frame, nb):
splitter = MySplitter(nb, -1)
p1 = wx.Window(splitter, -1)
p1.SetBackgroundColour(wx.RED)
wx.StaticText(p1, -1, "Panel One", (5,5))#.SetBackgroundColour(wx.RED)
p2 = wx.Window(splitter, -1)
p2.SetBackgroundColour(wx.BLUE)
p2.SetForegroundColour(wx.WHITE)
wx.StaticText(p2, -1, "Panel Two", (5,5))#.SetBackgroundColour(wx.BLUE)
splitter.SetMinimumPaneSize(20)
splitter.SplitVertically(p1, p2, -100)
return splitter
if __name__ == '__main__':
from sys import argv
app = wx.PySimpleApp()
frm = wx.Frame(None, -1, 'Ein Name')
pnl = runTest(frm, -1)
frm.Show(1)
app.MainLoop()
folgende Fehlermeldung? Wieso fragt er nach einem Pointer?
Code: Alles auswählen
Traceback (most recent call last):
File "a.py", line 38, in ?
pnl = runTest(frm, -1)
File "a.py", line 16, in runTest
splitter = MySplitter(nb, -1)
File "a.py", line 9, in __init__
style = wx.SP_3D
File "C:\PROGRA~1\Python23\Lib\site-packages\wx\windows.py", line 692, in __init__
newobj = _windows.new_SplitterWindow(*args, **kwargs)
TypeError: Expected a pointer


