]> git.saurik.com Git - wxWidgets.git/commitdiff
Put the panel-under-htmlwindow hack back in since the problem still
authorRobin Dunn <robin@alldunn.com>
Mon, 29 Apr 2002 23:09:48 +0000 (23:09 +0000)
committerRobin Dunn <robin@alldunn.com>
Mon, 29 Apr 2002 23:09:48 +0000 (23:09 +0000)
happens.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15310 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/demo/Main.py

index f723cb0874a9c42f907e057ca6b55039e7139370..89372d40b9120d9ef6ef04a5c4fe88074d5b62a2 100644 (file)
@@ -382,8 +382,24 @@ class wxPythonDemo(wxFrame):
         self.nb = wxNotebook(splitter2, -1, style=wxCLIP_CHILDREN)
 
         # Set up a wxHtmlWindow on the Overview Notebook page
-        self.ovr = wxHtmlWindow(self.nb, -1, size=(400, 400))
-        self.nb.AddPage(self.ovr, self.overviewText)
+        # we put it in a panel first because there seems to be a
+        # refresh bug of some sort (wxGTK) when it is directly in
+        # the notebook...
+        if 0:  # the old way
+            self.ovr = wxHtmlWindow(self.nb, -1, size=(400, 400))
+            self.nb.AddPage(self.ovr, self.overviewText)
+
+        else:  # hopefully I can remove this hacky code soon, see bug #216861
+            panel = wxPanel(self.nb, -1, style=wxCLIP_CHILDREN)
+            self.ovr = wxHtmlWindow(panel, -1, size=(400, 400))
+            self.nb.AddPage(panel, self.overviewText)
+
+            def OnOvrSize(evt, ovr=self.ovr):
+                ovr.SetSize(evt.GetSize())
+
+            EVT_SIZE(panel, OnOvrSize)
+            EVT_ERASE_BACKGROUND(panel, EmptyHandler)
+
 
         self.SetOverview(self.overviewText, overview)