wxTextCtrl Selected Text
Posted: Thu Oct 22, 2009 6:50 am
Hi. How do you make it so text stays selected when the contents of a text control change? Every time the contents change, my selection gets unselected...
Official forum for the wxWidgets Cross-Platform GUI Toolkit
https://forums.wxwidgets.org/
Code: Select all
void wxRichTextCtrl::DoWriteText(const wxString& value, int flags)
{
wxString valueUnix = wxTextFile::Translate(value, wxTextFileType_Unix);
GetBuffer().InsertTextWithUndo(m_caretPosition+1, valueUnix, this, wxRICHTEXT_INSERT_WITH_PREVIOUS_PARAGRAPH_STYLE);
if ( flags & SetValue_SendEvent )
SendTextUpdatedEvent();
}