X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c878ceeae8d69f231477ef0f207766093547ab86..b843b628c9f936d6a87ca1e9b91e88a4604270c4:/wxPython/demo/TimeCtrl.py diff --git a/wxPython/demo/TimeCtrl.py b/wxPython/demo/TimeCtrl.py index 7b730fb0b9..2c8c2c98d3 100644 --- a/wxPython/demo/TimeCtrl.py +++ b/wxPython/demo/TimeCtrl.py @@ -16,14 +16,17 @@ class TestPanel( scrolled.ScrolledPanel ): scrolled.ScrolledPanel.__init__( self, parent, -1 ) self.log = log - + box_label = wx.StaticBox( self, -1, "Change Controls through API" ) + buttonbox = wx.StaticBoxSizer( box_label, wx.HORIZONTAL ) + text1 = wx.StaticText( self, -1, "12-hour format:") self.time12 = masked.TimeCtrl( self, -1, name="12 hour control" ) - spin1 = wx.SpinButton( self, -1, wx.DefaultPosition, (-1,20), 0 ) + h = self.time12.GetSize().height + spin1 = wx.SpinButton( self, -1, wx.DefaultPosition, (-1,h), wx.SP_VERTICAL ) self.time12.BindSpinButton( spin1 ) text2 = wx.StaticText( self, -1, "24-hour format:") - spin2 = wx.SpinButton( self, -1, wx.DefaultPosition, (-1,20), 0 ) + spin2 = wx.SpinButton( self, -1, wx.DefaultPosition, (-1,h), wx.SP_VERTICAL ) self.time24 = masked.TimeCtrl( self, -1, name="24 hour control", fmt24hr=True, spinButton = spin2 @@ -70,9 +73,7 @@ class TestPanel( scrolled.ScrolledPanel ): radio_vbox.Add( self.radio24to12, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) radio_vbox.Add( self.radioWx, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) radio_vbox.Add( self.radioMx, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALL, 5 ) - - box_label = wx.StaticBox( self, -1, "Change Controls through API" ) - buttonbox = wx.StaticBoxSizer( box_label, wx.HORIZONTAL ) + buttonbox.Add( buttonChange, 0, wx.ALIGN_CENTRE|wx.ALL, 5 ) buttonbox.Add( radio_vbox, 0, wx.ALIGN_CENTRE|wx.ALL, 5 ) @@ -226,7 +227,10 @@ def runTest( frame, nb, log ): #---------------------------------------------------------------------- import wx.lib.masked.timectrl as timectl -overview = timectl.__doc__ +overview = """ +

+""" + timectl.__doc__ + """
+
""" if __name__ == '__main__': import sys,os