|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
wxPanel widgets always crowd together on the up-left side of the frame
Hi People,
I'm a newbie to wxPython, and now is having a problem on the layout of widgets on a Panel within a Frame. No matter which Sizer I use, and what kind of layout format are adopted, all the widgets always crowd together on the up-left side of the frame, and left much spaces unused on the rest part of the frame . Below is all my code, please help. Thanks In Advance, JW import wx class AuditFrame(wx.Frame): def __init__(self): wx.Frame.__init__(self, None, -1, "TJBY Auditor",pos=(150, 150), size=(500, 200)) self.Panel = wx.Panel(self,-1,(0,0),(500,200),style=wx.SUNKEN_BORDER) self.PanelSizer = wx.GridBagSizer() self.btnSelect = wx.Button(self.Panel,-1,"Select Invoices") self.PanelSizer.Add(self.btnSelect,(0,0)) self.txtOpenPath = wx.StaticText(self.Panel,-1) self.PanelSizer.Add(self.txtOpenPath,(0,1)) self.btnCheck = wx.Button(self.Panel,-1,"Start Checking",(0,0)) self.btnCheck.Disable() self.PanelSizer.Add(self.btnCheck,(1,1)) self.TxtCtl = wx.TextCtrl(self.Panel,-1) self.PanelSizer.Add(self.TxtCtl,(2,0),(2,2)) #How to enlarge the TextCtrl? self.Panel.SetSizer(self.PanelSizer) app = wx.App(False) MainFrame = AuditFrame() MainFrame.Show() app.MainLoop() |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Python Programming > wxPanel widgets always crowd together on the up-left side of the frame |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|