[ wxwindows-Bugs-1710550 ] Panel not initially sizing correctly in a
captionless frame
SourceForge.net
noreply at sourceforge.net
Tue May 1 03:26:37 PDT 2007
Bugs item #1710550, was opened at 2007-05-01 06:26
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1710550&group_id=9863
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Common
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: John Clark (clajo04)
Assigned to: Nobody/Anonymous (nobody)
Summary: Panel not initially sizing correctly in a captionless frame
Initial Comment:
I am creating a very simple frame that contains a panel on which is a 'Close Me' button that will cause the frame to close. When the frame is created without a caption, the Panel does not correctly size to fill the interior of the frame. If the frame is then resized, the Panel will resize to fill the frame.
I am running wxPython 2.8 Unicode
ActiveState Python 2.5
Windows XP SP2
The code I am using is as follows:
import wx
class SubclassFrame(wx.Frame):
def __init__(self, *pargs, **kwargs):
wx.Frame.__init__(self,
None,
-1,
'Frame Subclass',
size=(300, 100),
style= wx.DEFAULT_FRAME_STYLE ^ wx.CAPTION)
panel = wx.Panel(self, -1)
button = wx.Button(panel, -1, 'Close Me', pos=(15, 15))
self.Bind(wx.EVT_BUTTON, self.on_close, button)
self.Bind(wx.EVT_CLOSE, self.on_close_window)
def on_close(self, event):
self.Close(True)
def on_close_window(self, event):
self.Destroy()
if ('__main__' == __name__):
app = wx.PySimpleApp()
SubclassFrame().Show()
app.MainLoop()
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1710550&group_id=9863
More information about the wx-dev
mailing list