diff --git a/etg/scrolwin.py b/etg/scrolwin.py index 29df9596..079211f1 100644 --- a/etg/scrolwin.py +++ b/etg/scrolwin.py @@ -122,8 +122,13 @@ def run(): ParamDef(name='name', type='const wxString&', default='wxPanelNameStr'), ]), ]), + MethodDef(name='SetFocusIgnoringChildren', type='void', items=[], + briefDoc="""\ + In contrast to SetFocus() this will set the focus to the panel even if + there are child windows in the panel. This is only rarely needed."""), ], ) + tools.fixWindowClass(klass) module.insertItemAfter(td, klass) diff --git a/unittests/test_scrolwin.py b/unittests/test_scrolwin.py index 0ae1df53..c54534f0 100644 --- a/unittests/test_scrolwin.py +++ b/unittests/test_scrolwin.py @@ -31,20 +31,24 @@ class scrolwin_Tests(wtc.WidgetTestCase): w = wx.ScrolledWindow(self.frame) self.commonBits(w) + def test_scrolwinDefaultCtor(self): w = wx.ScrolledWindow() w.Create(self.frame) self.commonBits(w) + def test_scrolcvsCtor(self): w = wx.ScrolledCanvas(self.frame) self.commonBits(w) + def test_scrolcvsDefaultCtor(self): w = wx.ScrolledCanvas() w.Create(self.frame) self.commonBits(w) + def test_scrolwinOnDraw(self): class MyScrolledWin(wx.ScrolledWindow): @@ -64,6 +68,13 @@ class scrolwin_Tests(wtc.WidgetTestCase): self.waitFor(100) self.assertTrue(w.flag) # True if OnDraw was called + + def test_SetFocusIgnoringChildren(self): + sw = wx.ScrolledWindow(self.frame) + sw.SetFocusIgnoringChildren() + + + #---------------------------------------------------------------------------