Don't bind the ACTIVATE events until the log window is created
authorRobin Dunn <robin@alldunn.com>
Sun, 10 Oct 2004 00:57:35 +0000 (00:57 +0000)
committerRobin Dunn <robin@alldunn.com>
Sun, 10 Oct 2004 00:57:35 +0000 (00:57 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29764 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/demo/Main.py

index fa4338f2fd25f0eee3bd80522e19f00ef41fa752..be0cd0a4f9b783f6cd110854dab9e897d93936ad 100644 (file)
@@ -398,8 +398,7 @@ try:
             # The rest remains unchanged.
 
             # Line numbers in margin
-            self.StyleSetSpec(wx.stc.STC_STYLE_LINENUMBER,'fore:#000000,back:#99A9C2')
-    
+            self.StyleSetSpec(wx.stc.STC_STYLE_LINENUMBER,'fore:#000000,back:#99A9C2')    
             # Highlighted brace
             self.StyleSetSpec(wx.stc.STC_STYLE_BRACELIGHT,'fore:#00009D,back:#FFFF00')
             # Unmatched brace
@@ -1050,8 +1049,6 @@ class wxPythonDemo(wx.Frame):
         self.Bind(wx.EVT_CLOSE, self.OnCloseWindow)
         self.Bind(wx.EVT_ICONIZE, self.OnIconfiy)
         self.Bind(wx.EVT_MAXIMIZE, self.OnMaximize)
-        self.Bind(wx.EVT_ACTIVATE, self.OnActivate)
-        wx.GetApp().Bind(wx.EVT_ACTIVATE_APP, self.OnAppActivate)
 
         self.Centre(wx.BOTH)
         self.CreateStatusBar(1, wx.ST_SIZEGRIP)
@@ -1205,6 +1202,9 @@ class wxPythonDemo(wx.Frame):
         #wx.Log_SetTraceMask(wx.TraceMessages)
 
 
+        self.Bind(wx.EVT_ACTIVATE, self.OnActivate)
+        wx.GetApp().Bind(wx.EVT_ACTIVATE_APP, self.OnAppActivate)
+
         # add the windows to the splitter and split it.
         splitter2.SplitHorizontally(self.nb, self.log, -160)
         splitter.SplitVertically(self.tree, splitter2, 200)