]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/demo/wxCheckBox.py
applied SourceForge patch # 854330 for Filedialog Unicode fixes
[wxWidgets.git] / wxPython / demo / wxCheckBox.py
index e2e81e3f2840ee5ee045df2e56b46e87bb039039..d7cceb618c0bc615abaf104a8e2cbd46740ba76a 100644 (file)
@@ -11,7 +11,7 @@ class TestCheckBox(wxPanel):
         wxStaticText(self, -1, "This example uses the wxCheckBox control.",
                                wxPoint(10, 10))
 
         wxStaticText(self, -1, "This example uses the wxCheckBox control.",
                                wxPoint(10, 10))
 
-        cID = NewId()
+        cID = wxNewId()
         cb1 = wxCheckBox(self, cID,   "  Apples", wxPoint(65, 40), wxSize(150, 20), wxNO_BORDER)
         cb2 = wxCheckBox(self, cID+1, "  Oranges", wxPoint(65, 60), wxSize(150, 20), wxNO_BORDER)
         cb2.SetValue(True)
         cb1 = wxCheckBox(self, cID,   "  Apples", wxPoint(65, 40), wxSize(150, 20), wxNO_BORDER)
         cb2 = wxCheckBox(self, cID+1, "  Oranges", wxPoint(65, 60), wxSize(150, 20), wxNO_BORDER)
         cb2.SetValue(True)
@@ -23,7 +23,7 @@ class TestCheckBox(wxPanel):
 
 
     def EvtCheckBox(self, event):
 
 
     def EvtCheckBox(self, event):
-        self.log.WriteText('EvtCheckBox: %d\n' % event.Checked())
+        self.log.WriteText('EvtCheckBox: %d\n' % event.IsChecked())
 
 #---------------------------------------------------------------------------
 
 
 #---------------------------------------------------------------------------
 
@@ -51,3 +51,11 @@ overview = """\
 A checkbox is a labelled box which is either on (checkmark is visible) or off (no checkmark).
 
 """
 A checkbox is a labelled box which is either on (checkmark is visible) or off (no checkmark).
 
 """
+
+
+
+if __name__ == '__main__':
+    import sys,os
+    import run
+    run.main(['', os.path.basename(sys.argv[0])])
+