X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d975da9bc4f16d73730a158dd94e4a108034c30b..5a32e18214d39968e22bd46ade02bd2bcb29458d:/wxPython/demo/Main.py diff --git a/wxPython/demo/Main.py b/wxPython/demo/Main.py index f723cb0874..fd626ec8be 100644 --- a/wxPython/demo/Main.py +++ b/wxPython/demo/Main.py @@ -153,7 +153,6 @@ _treeList = [ 'wxStaticBitmap', 'wxStatusBar', 'wxTextCtrl', - 'wxTimer', 'wxToggleButton', 'wxToolBar', 'wxTreeCtrl', @@ -382,8 +381,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) @@ -508,8 +523,9 @@ class wxPythonDemo(wxFrame): self.window = module.runTest(self, self.nb, self) ### if self.window: self.nb.AddPage(self.window, 'Demo') - wxYield() + #wxYield() TODO: Is this still needed? self.nb.SetSelection(2) + self.nb.Refresh() # without this wxMac has troubles showing the just added page else: self.ovr.SetPage("")