GUI programmieren, benötige Hilfe
Verfasst: Freitag 18. August 2006, 22:00
Hallo,
ich bekomme es einfach nicht hin.
Das Ergebniss soll ungefähr so aussehen.
Mein Code sieht so aus
Ich bräuchte einen Schubs in die richtige Richtung, einen Link zu soetwas ähnlichem und/oder nen Tip, wie ich zu dem gewünschten Ergebnis komme.
Vielen Dank für die Aufmerksamkeit.
ich bekomme es einfach nicht hin.
Das Ergebniss soll ungefähr so aussehen.
Mein Code sieht so aus
Code: Alles auswählen
#!/usr/bin/env python
# -*- coding: iso-8859-1 -*-
import wx
class ateMainFrame(wx.Frame):
def __init__(self, parent, id, title):
wx.Frame.__init__(self, parent, id, title, (-1, -1), wx.Size(400,300))
self.mainpanel = ateMainPanel(self,-1)
self.CreateStatusBar()
self.GetStatusBar().SetFieldsCount(2)
class ateMainPanel(wx.Panel):
def __init__(self,parent,id):
wx.Panel.__init__(self,parent,id,(-1,-1))
hbox = wx.BoxSizer(wx.HORIZONTAL)
vbox_l = wx.BoxSizer(wx.VERTICAL)
vbox_r = wx.BoxSizer(wx.VERTICAL)
t = wx.StaticText(self,-1,"Dat is ein Text")
t1 = wx.StaticText(self,-1,"Dat is ein Text")
t2 = wx.StaticText(self,-1,"Dat is ein Text")
box = wx.StaticBox(self, -1, "box")
bsizer = wx.StaticBoxSizer(box, wx.VERTICAL)
border = wx.BoxSizer()
box.SetSize((380,80))
border.Add(bsizer, 1, wx.EXPAND|wx.ALL, 25)
bsizer.Add(t, 0, wx.TOP|wx.LEFT, 10)
box1 = wx.StaticBox(self, -1, "box1")
bsizer1 = wx.StaticBoxSizer(box1, wx.VERTICAL)
border1 = wx.BoxSizer()
border1.Add(bsizer1, 1, wx.EXPAND|wx.ALL, 100)
bsizer1.Add(t1, 0, wx.TOP|wx.LEFT, 10)
box2 = wx.StaticBox(self, -1, "box2")
bsizer2 = wx.StaticBoxSizer(box2, wx.VERTICAL)
border2 = wx.BoxSizer()
border2.Add(bsizer2, 1, wx.EXPAND|wx.ALL, 25)
bsizer2.Add(t2, 0, wx.TOP|wx.LEFT, 10)
vbox_l.Add(border,0, wx.EXPAND)
vbox_l.Add(border1,0, wx.EXPAND)
vbox_r.Add(border2,0, wx.EXPAND)
hbox.Add(vbox_l,0, wx.EXPAND)
hbox.Add(vbox_r,0, wx.EXPAND)
self.SetSizer(hbox)
class ateNotebook(wx.Notebook):
def __init__(self,parent,id):
wx.Notebook.__init__(self,parent,id)
class ATE (wx.App):
def OnInit(self):
frame = ateMainFrame(None, -1, 'Titel')
frame.Show(True)
return True
if __name__ == '__main__':
app = ATE(0)
app.MainLoop()
Vielen Dank für die Aufmerksamkeit.