X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/eb0f373c99a98633a1a9125f6eac632a0ceafe9d..0c8392cac2d36d0d211432e71d3b24d3d93c22db:/wxPython/demo/wxStatusBar.py diff --git a/wxPython/demo/wxStatusBar.py b/wxPython/demo/wxStatusBar.py index 1c9b45655f..ac7dedd0f1 100644 --- a/wxPython/demo/wxStatusBar.py +++ b/wxPython/demo/wxStatusBar.py @@ -10,7 +10,7 @@ class CustomStatusBar(wxStatusBar): wxStatusBar.__init__(self, parent, -1) self.SetFieldsCount(3) self.log = log - self.sizeChanged = false + self.sizeChanged = False EVT_SIZE(self, self.OnSize) EVT_IDLE(self, self.OnIdle) @@ -18,7 +18,7 @@ class CustomStatusBar(wxStatusBar): self.cb = wxCheckBox(self, 1001, "toggle clock") EVT_CHECKBOX(self, 1001, self.OnToggleClock) - self.cb.SetValue(true) + self.cb.SetValue(True) # set the initial position of the checkbox self.Reposition() @@ -52,7 +52,7 @@ class CustomStatusBar(wxStatusBar): # Set a flag so the idle time handler will also do the repositioning. # It is done this way to get around a buglet where GetFieldRect is not # accurate during the EVT_SIZE resulting from a frame maximize. - self.sizeChanged = true + self.sizeChanged = True def OnIdle(self, evt): @@ -65,7 +65,7 @@ class CustomStatusBar(wxStatusBar): rect = self.GetFieldRect(1) self.cb.SetPosition(wxPoint(rect.x+2, rect.y+2)) self.cb.SetSize(wxSize(rect.width-4, rect.height-4)) - self.sizeChanged = false + self.sizeChanged = False @@ -91,7 +91,7 @@ class TestCustomStatusBar(wxFrame): def runTest(frame, nb, log): win = TestCustomStatusBar(frame, log) frame.otherWin = win - win.Show(true) + win.Show(True) #--------------------------------------------------------------------------- @@ -104,5 +104,16 @@ def runTest(frame, nb, log): overview = """\ -A status bar is a narrow window that can be placed along the bottom of a frame to give small amounts of status information. It can contain one or more fields, one or more of which can be variable length according to the size of the window. -""" +A status bar is a narrow window that can be placed along the bottom of +a frame to give small amounts of status information. It can contain +one or more fields, one or more of which can be variable length +according to the size of the window. """ + + + + + +if __name__ == '__main__': + import sys,os + import run + run.main(['', os.path.basename(sys.argv[0])])