[wxPython-users] Panel Widgets always crowd together on the up-left side of the frame
by =?GB2312?B?va3OxA==?= other posts by this author
Dec 3 2004 2:31PM messages near this date
[PHP-GTK] Fix the size of the elements
|
Re: [wxPython-users] Panel 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 Pane
l 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 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()
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@[...].org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org
Thread:
=?GB2312?B?va3OxA==?=
Ed Leafe
|