Add [Show|Hide]NativeCaret for MSW.

This commit is contained in:
Robin Dunn
2016-02-27 17:36:17 -08:00
parent a14e2f7b54
commit 30a2bf13bc
2 changed files with 25 additions and 0 deletions

View File

@@ -76,6 +76,26 @@ def parseAndTweakModule():
#endif
""")
c.addCppMethod('bool', 'ShowNativeCaret', '(bool show = true)',
doc="""\
Turn on the widget's native caret on Windows.
Ignored on other platforms.
""",
body="""\
#ifdef __WXMSW__
return self->ShowNativeCaret(show);
#endif
""")
c.addCppMethod('bool', 'HideNativeCaret', '()',
doc="""\
Turn off the widget's native caret on Windows.
Ignored on other platforms.
""",
body="""\
#ifdef __WXMSW__
return self->HideNativeCaret();
#endif
""")
c = module.find('wxTextUrlEvent')
tools.fixEventClass(c)

View File

@@ -93,6 +93,11 @@ class textctrl_Tests(wtc.WidgetTestCase):
ta.URL
def test_textctrlNativeCaret(self):
t = wx.TextCtrl(self.frame)
t.ShowNativeCaret
t.HideNativeCaret
#---------------------------------------------------------------------------