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
-
- Knows some wx things
- Posts: 26
- Joined: Wed Jul 20, 2005 9:08 am
-
- Moderator
- Posts: 1618
- Joined: Wed Nov 12, 2008 7:23 am
- Location: Romania
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.
-
- Moderator
- Posts: 19163
- Joined: Fri Apr 21, 2006 8:03 pm
- Location: $FCE2
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!
-
- Knows some wx things
- Posts: 26
- Joined: Wed Jul 20, 2005 9:08 am
Re: wxTextCtrl and wxTE_RICH
Thanks.
Stefania
Stefania