]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/samples/doodle/superdoodle.py
Added stub for wxIcon(const char **xpm)
[wxWidgets.git] / wxPython / samples / doodle / superdoodle.py
index 7bc579d7854d2eb1ac1d2c69f338b870cdc3bb20..08ee49339e497318d4374caa3b520036e3b52737 100644 (file)
@@ -35,7 +35,8 @@ class DoodleFrame(wxFrame):
     """
     title = "Do a doodle"
     def __init__(self, parent):
-        wxFrame.__init__(self, parent, -1, self.title, size=(800,600))
+        wxFrame.__init__(self, parent, -1, self.title, size=(800,600),
+                         style=wxDEFAULT_FRAME_STYLE | wxNO_FULL_REPAINT_ON_RESIZE)
         self.CreateStatusBar()
         self.MakeMenu()
         self.filename = None
@@ -52,7 +53,7 @@ class DoodleFrame(wxFrame):
 
         # Tell the frame that it should layout itself in response to
         # size events.
-        self.SetAutoLayout(true)
+        self.SetAutoLayout(True)
         self.SetSizer(box)
 
 
@@ -109,7 +110,7 @@ class DoodleFrame(wxFrame):
     wildcard = "Doodle files (*.ddl)|*.ddl|All files (*.*)|*.*"
 
     def OnMenuOpen(self, event):
-        dlg = wxFileDialog(self, "Open doodle file...",
+        dlg = wxFileDialog(self, "Open doodle file...", os.getcwd(),
                            style=wxOPEN, wildcard = self.wildcard)
         if dlg.ShowModal() == wxID_OK:
             self.filename = dlg.GetPath()
@@ -126,7 +127,7 @@ class DoodleFrame(wxFrame):
 
 
     def OnMenuSaveAs(self, event):
-        dlg = wxFileDialog(self, "Save doodle as...",
+        dlg = wxFileDialog(self, "Save doodle as...", os.getcwd(),
                            style=wxSAVE | wxOVERWRITE_PROMPT,
                            wildcard = self.wildcard)
         if dlg.ShowModal() == wxID_OK:
@@ -212,7 +213,7 @@ class ControlPanel(wxPanel):
         box.Add(tGrid, 0, wxALL, spacing)
         box.Add(ci, 0, wxEXPAND|wxALL, spacing)
         self.SetSizer(box)
-        self.SetAutoLayout(true)
+        self.SetAutoLayout(True)
 
         # Resize this window so it is just large enough for the
         # minimum requirements of the sizer.
@@ -260,7 +261,7 @@ class ColourIndicator(wxWindow):
     def __init__(self, parent):
         wxWindow.__init__(self, parent, -1, style=wxSUNKEN_BORDER)
         self.SetBackgroundColour(wxWHITE)
-        self.SetSize(wxSize(-1, 40))
+        self.SetSize(wxSize(-1, 45))
         self.colour = self.thickness = None
         EVT_PAINT(self, self.OnPaint)
 
@@ -347,7 +348,7 @@ instructions: </p>
         lc.height.AsIs()
         button.SetConstraints(lc)
 
-        self.SetAutoLayout(true)
+        self.SetAutoLayout(True)
         self.Layout()
         self.CentreOnParent(wxBOTH)
 
@@ -357,9 +358,9 @@ instructions: </p>
 class DoodleApp(wxApp):
     def OnInit(self):
         frame = DoodleFrame(None)
-        frame.Show(true)
+        frame.Show(True)
         self.SetTopWindow(frame)
-        return true
+        return True
 
 
 #----------------------------------------------------------------------