Hi!
I need to set wxTE_RICH flag after the wxTextCtrl has created, but does not work fine.
wxTextAttr *l_attr = new wxTextAttr;
l_attr->SetFlags( wxTE_RICH);
l_attr->SetAlignment( wxTEXT_ALIGNMENT_RIGHT);
c_ptrtext->SetDefaultStyle( *l_attr);
Is there a way to set this flak dinamiccaly?
Thanks
Stefania
wxTextCtrl and wxTE_RICH Topic is solved
Re: wxTextCtrl and wxTE_RICH
No.
In wxTextCtrl docs, at the end of 'Styles' section there is a note about the styles that can be changed dynamically after control creation (only wxTE_LEFT, wxTE_CENTRE and wxTE_RIGHT for wxMSW).
You can probably create a new control, copy the contents and replace the old one.
In wxTextCtrl docs, at the end of 'Styles' section there is a note about the styles that can be changed dynamically after control creation (only wxTE_LEFT, wxTE_CENTRE and wxTE_RIGHT for wxMSW).
You can probably create a new control, copy the contents and replace the old one.
Re: wxTextCtrl and wxTE_RICH
From the wxTextCtrl documentation:
Also: This is a window style flag. *If* it worked, you'd have to use wxWindow::SetWindowStyleFlag() to set it.Note that alignment styles (wxTE_LEFT, wxTE_CENTRE and wxTE_RIGHT) can be changed dynamically after control creation on wxMSW and wxGTK. wxTE_READONLY, wxTE_PASSWORD and wrapping styles can be dynamically changed under wxGTK but not wxMSW. The other styles can be only set during control creation.
Use the source, Luke!
Re: wxTextCtrl and wxTE_RICH
Thanks.
Stefania
Stefania