I'm looking for a way to switch between wrap and hsrcoll during the TextCtrl is visible.
I tried this code: (m_XML is the wxTextCtrl)
Code: Select all
void XmlDlg::onWrap( wxCommandEvent& event ) {
long style = m_XML->GetWindowStyleFlag();
if( m_Wrap->IsChecked() )
style |= wxTE_DONTWRAP;
else
style &= ~wxTE_DONTWRAP;
m_XML->SetWindowStyleFlag(style);
m_XML->Refresh();
}
(onWrap is linked with a CheckBox.)
Any suggestion?