]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/wx/lib/plot.py
script for the api docs
[wxWidgets.git] / wxPython / wx / lib / plot.py
index 416fc559af81ff56cbc91656d14dd9cb933093d3..946b5bdf2859c16d59bbc0247501c97db0c63491 100644 (file)
 # o Reworked test frame to work with wx demo framework. This saves a bit
 #   of tedious cut and paste, and the test app is excellent.
 #
+# 12/18/2003 - Jeff Grimmett (grimmtooth@softhome.net)
+#
+# o wxScrolledMessageDialog -> ScrolledMessageDialog
+#
 
 """
 This is a simple light weight plotting module that can be used with
@@ -388,9 +392,6 @@ class PlotCanvas(wx.Window):
 
         self.SetBackgroundColour("white")
         
-        self.Bind(wx.EVT_PAINT, self.OnPaint)
-        self.Bind(wx.EVT_SIZE, self.OnSize)
-        
         # Create some mouse events for zooming
         self.Bind(wx.EVT_LEFT_DOWN, self.OnMouseLeftDown)
         self.Bind(wx.EVT_LEFT_UP, self.OnMouseLeftUp)
@@ -435,10 +436,13 @@ class PlotCanvas(wx.Window):
         self._fontSizeTitle= 15
         self._fontSizeLegend= 7
 
+        self.Bind(wx.EVT_PAINT, self.OnPaint)
+        self.Bind(wx.EVT_SIZE, self.OnSize)
         # OnSize called to make sure the buffer is initialized.
         # This might result in OnSize getting called twice on some
         # platforms at initialization, but little harm done.
-        self.OnSize(None) # sets the initial size based on client size
+               if wx.Platform != "__WXMAC__":
+                   self.OnSize(None) # sets the initial size based on client size
 
         
     # SaveFile
@@ -1455,8 +1459,8 @@ class TestFrame(wx.Frame):
         self.client.Reset()
 
     def OnHelpAbout(self, event):
-        from wx.lib.dialogs import wxScrolledMessageDialog
-        about = wxScrolledMessageDialog(self, __doc__, "About...")
+        from wx.lib.dialogs import ScrolledMessageDialog
+        about = ScrolledMessageDialog(self, __doc__, "About...")
         about.ShowModal()
 
     def resetDefaults(self):