Ich habe das folgende wxpathon skript erstellt.
Es macht auch das was ich möchte nur kann ich eine panels bzw. Fenster nicht in der Grösse bestimmen.
Wie kann ich die Ausgangsgrösse festlegen?
Ich möchte die Fenster gerne nach Position oder Prozentual anornen doch mit dem Befehl pos=(...,...) habe ich es nicht hinbekommen.
Danke für eure Hilfe.
Sorry bin neu hier und hoffe iche es richtig eingestellt.
Code: Alles auswählen
import wx
class MainFrame(wx.Frame):
def __init__(self):
wx.Frame.__init__(self, None, title="Simple Notebook Example")
neuesFenster = wx.SplitterWindow(self)
Fenster1=wx.SplitterWindow(neuesFenster)
Fenster2=wx.SplitterWindow(Fenster1)
Fenster3=wx.SplitterWindow(Fenster1)
Fenster2a=wx.SplitterWindow(Fenster2)
Fenster2b=wx.SplitterWindow(Fenster2)
Fenster3a=wx.SplitterWindow(Fenster3)
Fenster3b=wx.SplitterWindow(Fenster3)
panel1 = wx.Panel(neuesFenster)
panel3 = wx.Panel(Fenster3a)
panel4 = wx.Panel(Fenster3a)
panel5 = wx.Panel(Fenster2a)
panel6 = wx.Panel(Fenster2a)
panel7 = wx.Panel(Fenster3b)
panel8 = wx.Panel(Fenster3b)
panel9 = wx.Panel(Fenster2b)
panel10 = wx.Panel(Fenster2b)
neuesFenster.SplitHorizontally(panel1, Fenster1)
Fenster1.SplitVertically(Fenster2, Fenster3)
Fenster2.SplitVertically(Fenster2a, Fenster2b)
Fenster3.SplitVertically(Fenster3a, Fenster3b)
Fenster3a.SplitHorizontally(panel3, panel4)
Fenster2a.SplitHorizontally(panel5, panel6)
Fenster3b.SplitHorizontally(panel7, panel8)
Fenster2b.SplitHorizontally(panel9, panel10)
panel1.SetBackgroundColour("red")
panel3.SetBackgroundColour("blue")
panel4.SetBackgroundColour("green")
panel5.SetBackgroundColour("lila")
panel6.SetBackgroundColour("yellow")
panel7.SetBackgroundColour("white")
panel8.SetBackgroundColour("grey")
panel9.SetBackgroundColour("purple")
panel10.SetBackgroundColour("red")
if __name__ == '__main__':
app = wx.App()
MainFrame().Show()
app.MainLoop()