default style now applies to the text entered by the user as well (patch 574789)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16241 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -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
|
||||
// ----------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user