Python Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPython Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 4th, 2004, 12:52 AM
jiangwen365 jiangwen365 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Posts: 2 jiangwen365 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 m 31 sec
Reputation Power: 0
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()

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPython Programming > wxPanel widgets always crowd together on the up-left side of the frame


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT