]> git.saurik.com Git - wxWidgets.git/commitdiff
Add a sample of a wx.StaticBox
authorRobin Dunn <robin@alldunn.com>
Mon, 7 Feb 2005 20:53:50 +0000 (20:53 +0000)
committerRobin Dunn <robin@alldunn.com>
Mon, 7 Feb 2005 20:53:50 +0000 (20:53 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31835 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/demo/Main.py
wxPython/demo/StaticBox.py [new file with mode: 0644]

index ab5e8d6612869836a5b55099635776ee243a1b50..61bb75c685318800a3fc019c1d623ffac13ac056 100644 (file)
@@ -112,6 +112,7 @@ _treeList = [
         'SpinCtrl',
         'SplitterWindow',
         'StaticBitmap',
+        'StaticBox',
         'StaticText',
         'StatusBar',
         'StockButtons',
diff --git a/wxPython/demo/StaticBox.py b/wxPython/demo/StaticBox.py
new file mode 100644 (file)
index 0000000..0ee42ba
--- /dev/null
@@ -0,0 +1,47 @@
+
+import wx
+
+#----------------------------------------------------------------------
+
+class TestPanel(wx.Panel):
+    def __init__(self, parent, log):
+        self.log = log
+        wx.Panel.__init__(self, parent, -1)
+
+        box = wx.StaticBox(self, -1, "This is a wx.StaticBox")
+        bsizer = wx.StaticBoxSizer(box, wx.VERTICAL)
+
+        t = wx.StaticText(self, -1, "Controls placed \"inside\" the box are really it's siblings")
+        bsizer.Add(t, 0, wx.TOP|wx.LEFT, 10)
+
+
+        border = wx.BoxSizer()
+        border.Add(bsizer, 1, wx.EXPAND|wx.ALL, 25)
+        self.SetSizer(border)
+        
+
+#----------------------------------------------------------------------
+
+def runTest(frame, nb, log):
+    win = TestPanel(nb, log)
+    return win
+
+#----------------------------------------------------------------------
+
+
+
+overview = """<html><body>
+<h2><center>wx.StaticBox</center></h2>
+
+This control draws a box and can be used to group other controls.
+
+</body></html>
+"""
+
+
+
+if __name__ == '__main__':
+    import sys,os
+    import run
+    run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:])
+