]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/samples/pySketch/pySketch.py
use wxSizerFlags and updated CreateButtonSizer() in all generic dialogs
[wxWidgets.git] / wxPython / samples / pySketch / pySketch.py
index 7fe467ff1f273f3c6c2213a25823141638cb10f8..cf580fa5004b08d079e762ce319b10caba68d656 100644 (file)
@@ -215,7 +215,7 @@ class DrawingFrame(wx.Frame):
                                           wx.NO_BORDER | wx.TB_FLAT)
 
         self.toolbar.AddSimpleTool(wx.ID_NEW,
                                           wx.NO_BORDER | wx.TB_FLAT)
 
         self.toolbar.AddSimpleTool(wx.ID_NEW,
-                                   wx.ArtProvider.GetBitmap(wx.ART_NORMAL_FILE, wx.ART_TOOLBAR, tsize),
+                                   wx.ArtProvider.GetBitmap(wx.ART_NEW, wx.ART_TOOLBAR, tsize),
                                    "New")
         self.toolbar.AddSimpleTool(wx.ID_OPEN,
                                    wx.ArtProvider.GetBitmap(wx.ART_FILE_OPEN, wx.ART_TOOLBAR, tsize),
                                    "New")
         self.toolbar.AddSimpleTool(wx.ID_OPEN,
                                    wx.ArtProvider.GetBitmap(wx.ART_FILE_OPEN, wx.ART_TOOLBAR, tsize),
@@ -793,14 +793,14 @@ class DrawingFrame(wx.Frame):
         menu.Enable(menu_MOVE_BACKWARD, obj != self.contents[-1])
         menu.Enable(menu_MOVE_TO_BACK,  obj != self.contents[-1])
 
         menu.Enable(menu_MOVE_BACKWARD, obj != self.contents[-1])
         menu.Enable(menu_MOVE_TO_BACK,  obj != self.contents[-1])
 
-        EVT_MENU(self, menu_DUPLICATE,     self.doDuplicate)
-        EVT_MENU(self, menu_EDIT_TEXT,     self.doEditText)
-        EVT_MENU(self, menu_DELETE,        self.doDelete)
-        EVT_MENU(self, menu_MOVE_FORWARD,  self.doMoveForward)
-        EVT_MENU(self, menu_MOVE_TO_FRONT, self.doMoveToFront)
-        EVT_MENU(self, menu_MOVE_BACKWARD, self.doMoveBackward)
-        EVT_MENU(self, menu_MOVE_TO_BACK,  self.doMoveToBack)
-
+        self.Bind(wx.EVT_MENU, self.doDuplicate, id=menu_DUPLICATE)
+        self.Bind(wx.EVT_MENU, self.doEditText, id=menu_EDIT_TEXT)
+        self.Bind(wx.EVT_MENU, self.doDelete, id=menu_DELETE)
+        self.Bind(wx.EVT_MENU, self.doMoveForward, id=menu_MOVE_FORWARD)
+        self.Bind(wx.EVT_MENU, self.doMoveToFront, id=menu_MOVE_TO_FRONT)
+        self.Bind(wx.EVT_MENU, self.doMoveBackward, id=menu_MOVE_BACKWARD)
+        self.Bind(wx.EVT_MENU, self.doMoveToBack, id=menu_MOVE_TO_BACK)  
+                            
         # Show the pop-up menu.
 
         clickPt = wx.Point(mousePt.x + self.drawPanel.GetPosition().x,
         # Show the pop-up menu.
 
         clickPt = wx.Point(mousePt.x + self.drawPanel.GetPosition().x,