Skip to content Skip to sidebar Skip to footer

Multiple Panel In Wxpython

Is it possible to have multiple panel in wxpython? I want to have something like this: import wx.grid import sys class Mat_Frame(wx.Frame): def __init__(self,parent):

Solution 1:

You can create as many Panels as you want. You've only created one though, then a series of tuples. You may want this:

self.panel=wx.Panel(self,-1,size=(x,x))
panel1=wx.Panel(self.panel,-1,size=(x,x))
panel2=wx.Panel(self.panel,-1,size=(x,x))

That will actually create several Panels, with the second two being children of the first one. Their layout isn't going to be friendly yet though - you're going to need to look into Sizers.


Solution 2:

Sorry, I just realized I had forgotten to set the sizer. It worked fine after that.


Post a Comment for "Multiple Panel In Wxpython"