From 58ac0a3b73708d8b882c4bf2d3dd867a69ffb456 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Sat, 14 Oct 2000 04:45:22 +0000 Subject: [PATCH] workaround for a refresh bug git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8552 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/demo/Main.py | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/wxPython/demo/Main.py b/wxPython/demo/Main.py index ca44b0397f..32b84ee5c6 100644 --- a/wxPython/demo/Main.py +++ b/wxPython/demo/Main.py @@ -162,9 +162,25 @@ class wxPythonDemo(wxFrame): # Create a Notebook self.nb = wxNotebook(splitter2, -1) - # Set up a TextCtrl on the Overview Notebook page - self.ovr = wxHtmlWindow(self.nb, -1) - self.nb.AddPage(self.ovr, "Overview") + # Set up a wxHtmlWindow on the Overview Notebook page + # 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, "Overview") + + else: # hopefully I can remove this hacky code soon + panel = wxPanel(self.nb, -1) + self.ovr = wxHtmlWindow(panel, -1, size=(400, 400)) + self.nb.AddPage(panel, "Overview") + + def OnOvrSize(evt, ovr=self.ovr): + ovr.SetSize(evt.GetSize()) + + EVT_SIZE(panel, OnOvrSize) + + self.SetOverview("Overview", overview) # Set up a TextCtrl on the Demo Code Notebook page