Updated layout test

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27079 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2004-05-03 20:34:05 +00:00
parent a8d55739f8
commit 3bcdbe527f
3 changed files with 22 additions and 13 deletions

BIN
wxPython/misc/image.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

View File

@@ -10,7 +10,7 @@
['wx', 'BitmapButton', '-1, wx.Bitmap("image.png")'], ['wx', 'BitmapButton', '-1, wx.Bitmap("image.png")'],
['wx', 'StaticBitmap', '-1, wx.Bitmap("image.png")'], ['wx', 'StaticBitmap', '-1, wx.Bitmap("image.png")'],
['wx.calendar', 'CalendarCtrl', '-1'], ['wx.calendar', 'CalendarCtrl', '-1'],
['wx', 'CheckListBox', '-1, choices="one two three four five six seven eight".split()'], ['wx', 'CheckListBox', '-1, size=(100,-1), choices="one two three four five six seven eight".split()'],
['wx', 'Choice', '-1, choices="one two three four five six seven eight".split()'], ['wx', 'Choice', '-1, choices="one two three four five six seven eight".split()'],
['wx', 'ComboBox', '-1, choices="one two three four five six seven eight".split(), value="default"'], ['wx', 'ComboBox', '-1, choices="one two three four five six seven eight".split(), value="default"'],
['wx', 'Gauge', '-1, 100'], ['wx', 'Gauge', '-1, 100'],

View File

@@ -42,8 +42,7 @@ class LayoutTestFrame(wx.Frame):
bottomPanel.SetDefaultBackgroundColour("light blue") bottomPanel.SetDefaultBackgroundColour("light blue")
self.testPanel = wx.Panel(bottomPanel, name="testPanel") self.testPanel = wx.Panel(bottomPanel, name="testPanel")
self.testPanel.SetSizeHints((20,20)) self.testPanel.SetDefaultBackgroundColour((205, 183, 181)) # mistyrose3
#self.testPanel.SetDefaultBackgroundColour("dark red")
self.testWidget = None self.testWidget = None
@@ -275,24 +274,34 @@ class LayoutTestFrame(wx.Frame):
self.destroyBtn.SetDefault() self.destroyBtn.SetDefault()
if True:
print 'w size', w.GetSize()
print 'w minsize', w.GetMinSize()
print 'w bestsize', w.GetBestSize()
print 'w abstsize', w.GetAdjustedBestSize()
tp = self.testPanel
#print tp.GetSizer()
print 'tp size', tp.GetSize()
print 'tp minsize', tp.GetMinSize()
print 'tp bestsize', tp.GetBestSize()
print 'tp abstsize', tp.GetAdjustedBestSize()
def OnDestroyWidget(self, evt): def OnDestroyWidget(self, evt):
self.testWidget.Destroy() self.testWidget.Destroy()
self.testWidget = None self.testWidget = None
self.testPanel.SetSizer(None, True) self.testPanel.SetSizer(None, True)
# ensure the panel shrinks again
self.testPanel.SetSizeHints((20,20))
self.bottomSizer.Layout() self.bottomSizer.Layout()
self.testPanel.SetSizeHints(wx.DefaultSize)
# make the create button be default now # make the create button be default now
self.createBtn.SetDefault() self.createBtn.SetDefault()
## tp = self.testPanel
## print tp.GetSizer()
## print 'size', tp.GetSize()
## print 'minsize', tp.GetMinSize()
## print 'bestsize', tp.GetBestSize()
## print 'abstsize', tp.GetAdjustedBestSize()
def OnClear(self, evt): def OnClear(self, evt):
self.moduleName.SetValue("") self.moduleName.SetValue("")