Hi!
I'm totally new to Python and I'm jus nw trying to create my first application with wxPython, exciting! However, I have a problem:
I'm creating a Frame with a menu and buttonpanel (wx.lib.buttonp anel), then below this I want to have I splitter window, more or less like the file explorer in Windows.
This is (some of) my code:
[CODE=python]
wx.Frame.__init __(self, parent, -1, title,
style = wx.DEFAULT_FRAM E_STYLE | wx.MAXIMIZE | wx.NO_FULL_REPA INT_ON_RESIZE)
self.MyPanel = wx.Panel(self, style = wx.MAXIMIZE )
self.MyMenu = MyMenu(self)
self.MyButtonPa nel = MyButtonPanel(s elf.MyPanel)
splitter = wx.SplitterWind ow(self.MyPanel , -1, size = (3000, 2000), style = wx.SP_LIVE_UPDA TE)
sty = wx.BORDER_SUNKE N | wx.MAXIMIZE
p1 = wx.Window(split ter, style=sty)
p1.SetBackgroun dColour("white" )
wx.StaticText(p 1, -1, "Panel One", (5,5))
p2 = wx.Window(split ter, style=sty)
p2.SetBackgroun dColour("white" )
wx.StaticText(p 2, -1, "Panel Two", (5,5))
splitter.SetMin imumPaneSize(20 )
splitter.SplitV ertically(p1, p2, 200)
[/CODE]
My first question is about layout, I think I have missed something important. The Frame and menu looks good, but the buttonpanel and the splitter start in the same point, just below the menu. How can I tell he splitter to start where the buttonpanel ends (in the y direcion)? I'm not sure how to layout the different objects so that it looks good, so that they will not overlap.
The other question is about the size of the splitter, now it is (3000, 2000), just to be sure to always not be smaller than the screen. I didn't suceed to get the screen size to set that size nor did I find any attribute MAXIMIZE or similar.
I'm running python version 2.5.
Thanks in advance!
Björn
I'm totally new to Python and I'm jus nw trying to create my first application with wxPython, exciting! However, I have a problem:
I'm creating a Frame with a menu and buttonpanel (wx.lib.buttonp anel), then below this I want to have I splitter window, more or less like the file explorer in Windows.
This is (some of) my code:
[CODE=python]
wx.Frame.__init __(self, parent, -1, title,
style = wx.DEFAULT_FRAM E_STYLE | wx.MAXIMIZE | wx.NO_FULL_REPA INT_ON_RESIZE)
self.MyPanel = wx.Panel(self, style = wx.MAXIMIZE )
self.MyMenu = MyMenu(self)
self.MyButtonPa nel = MyButtonPanel(s elf.MyPanel)
splitter = wx.SplitterWind ow(self.MyPanel , -1, size = (3000, 2000), style = wx.SP_LIVE_UPDA TE)
sty = wx.BORDER_SUNKE N | wx.MAXIMIZE
p1 = wx.Window(split ter, style=sty)
p1.SetBackgroun dColour("white" )
wx.StaticText(p 1, -1, "Panel One", (5,5))
p2 = wx.Window(split ter, style=sty)
p2.SetBackgroun dColour("white" )
wx.StaticText(p 2, -1, "Panel Two", (5,5))
splitter.SetMin imumPaneSize(20 )
splitter.SplitV ertically(p1, p2, 200)
[/CODE]
My first question is about layout, I think I have missed something important. The Frame and menu looks good, but the buttonpanel and the splitter start in the same point, just below the menu. How can I tell he splitter to start where the buttonpanel ends (in the y direcion)? I'm not sure how to layout the different objects so that it looks good, so that they will not overlap.
The other question is about the size of the splitter, now it is (3000, 2000), just to be sure to always not be smaller than the screen. I didn't suceed to get the screen size to set that size nor did I find any attribute MAXIMIZE or similar.
I'm running python version 2.5.
Thanks in advance!
Björn
Comment