+ def Update(self, w, tp):
+ self.wPane.Update(w)
+ self.tpPane.Update(tp)
+ self.cPane.Update(w)
+
+ def Clear(self):
+ self.wPane.Clear()
+ self.tpPane.Clear()
+ self.cPane.Clear()
+
+
+
+class SizeInfoPane(wx.Panel):
+ """
+ A component of the InfoPane that shows vaious window size attributes.
+ """
+ def __init__(self, parent, label):
+ wx.Panel.__init__(self, parent)
+
+ # create subwidgets
+ sb = wx.StaticBox(self, -1, label)
+ self._size = wx.TextCtrl(self, -1, "", style=wx.TE_READONLY)
+ self._minsize = wx.TextCtrl(self, -1, "", style=wx.TE_READONLY)
+ self._bestsize = wx.TextCtrl(self, -1, "", style=wx.TE_READONLY)
+ self._adjbstsize = wx.TextCtrl(self, -1, "", style=wx.TE_READONLY)
+ self._bestfit = wx.TextCtrl(self, -1, "", style=wx.TE_READONLY)
+
+ # setup the layout
+ fgs = wx.FlexGridSizer(2, 2, 5, 5)
+ fgs.AddGrowableCol(1)
+
+ fgs.Add(wx.StaticText(self, -1, "Size:"),
+ 0, wx.ALIGN_RIGHT|wx.ALIGN_CENTER_VERTICAL)
+ fgs.Add(self._size, 0, wx.EXPAND)
+
+ fgs.Add(wx.StaticText(self, -1, "MinSize:"),
+ 0, wx.ALIGN_RIGHT|wx.ALIGN_CENTER_VERTICAL)
+ fgs.Add(self._minsize, 0, wx.EXPAND)
+
+ fgs.Add(wx.StaticText(self, -1, "BestSize:"),
+ 0, wx.ALIGN_RIGHT|wx.ALIGN_CENTER_VERTICAL)
+ fgs.Add(self._bestsize, 0, wx.EXPAND)
+
+ fgs.Add(wx.StaticText(self, -1, "AdjustedBestSize:"),
+ 0, wx.ALIGN_RIGHT|wx.ALIGN_CENTER_VERTICAL)
+ fgs.Add(self._adjbstsize, 0, wx.EXPAND)
+
+ fgs.Add(wx.StaticText(self, -1, "BestFittingSize:"),
+ 0, wx.ALIGN_RIGHT|wx.ALIGN_CENTER_VERTICAL)
+ fgs.Add(self._bestfit, 0, wx.EXPAND)
+
+ sbs = wx.StaticBoxSizer(sb, wx.VERTICAL)
+ sbs.Add(fgs, 0, wx.EXPAND|wx.ALL, 4)
+
+ self.SetSizer(sbs)
+