Fix missing SetFocusIgnoringChildren in wx.ScrolledWindow.

Fixes #225
This commit is contained in:
Robin Dunn
2017-02-09 14:46:05 -08:00
parent ecc47974a8
commit b3485d4dc7
2 changed files with 16 additions and 0 deletions

View File

@@ -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)

View File

@@ -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()
#---------------------------------------------------------------------------