From dfc4b62e112ed8104bde9c6ed30505ff83ec7fcd Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Wed, 25 Oct 2017 17:40:19 -0700 Subject: [PATCH] Add methods to wx.TextCtrl for output "file-like" compatibility --- CHANGES.rst | 3 +++ etg/textctrl.py | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 3d243224..91847393 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -38,6 +38,9 @@ Changes in this release include the following: * Add missing ``wx.GetLocale`` function. (#572) +* Add methods to wx.TextCtrl for output "file-like" compatibility. (#578) + + diff --git a/etg/textctrl.py b/etg/textctrl.py index a825b0f7..e45cee34 100644 --- a/etg/textctrl.py +++ b/etg/textctrl.py @@ -98,6 +98,14 @@ def parseAndTweakModule(): #endif """) + # Methods for "file-like" compatibility + c.addCppMethod('void', 'write', '(const wxString* text)', + doc="Append text to the textctrl, for file-like compatibility.", + body="self->AppendText(*text);") + c.addCppMethod('void', 'flush', '()', + doc="NOP, for file-like compatibility.", + body="") + c = module.find('wxTextUrlEvent') tools.fixEventClass(c)