X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f1fbff28875d7bc58fa493f5d83d9a1de38e002e..74698d3a22d5e611bbcd731a3ade616c66cfaca6:/src/msw/textctrl.cpp diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp index 3824a797f4..14801b5eac 100644 --- a/src/msw/textctrl.cpp +++ b/src/msw/textctrl.cpp @@ -1788,6 +1788,19 @@ bool wxTextCtrl::SetStyle(long start, long end, const wxTextAttr& style) return ok; } +bool wxTextCtrl::SetDefaultStyle(const wxTextAttr& style) +{ + if ( !wxTextCtrlBase::SetDefaultStyle(style) ) + return FALSE; + + // we have to do this or the style wouldn't apply for the text typed by the + // user + long posLast = GetLastPosition(); + SetStyle(posLast, posLast, m_defaultStyle); + + return TRUE; +} + // ---------------------------------------------------------------------------- // wxRichEditModule // ----------------------------------------------------------------------------