X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/170acdc90e9f92f8b8120fa6c04acdbf45c89582..1f65137f8de90aba96242d5e44b00dfd0efa4b67:/src/richtext/richtextctrl.cpp?ds=sidebyside diff --git a/src/richtext/richtextctrl.cpp b/src/richtext/richtextctrl.cpp index 636c494439..bac9d50f61 100644 --- a/src/richtext/richtextctrl.cpp +++ b/src/richtext/richtextctrl.cpp @@ -109,18 +109,22 @@ wxRichTextCtrl::wxRichTextCtrl(wxWindow* parent, const wxString& value, const wxPoint& pos, const wxSize& size, - long style) + long style, + const wxValidator& validator, + const wxString& name) : wxScrollHelper(this) { Init(); - Create(parent, id, value, pos, size, style); + Create(parent, id, value, pos, size, style, validator, name); } /// Creation -bool wxRichTextCtrl::Create( wxWindow* parent, wxWindowID id, const wxString& value, const wxPoint& pos, const wxSize& size, long style) +bool wxRichTextCtrl::Create( wxWindow* parent, wxWindowID id, const wxString& value, const wxPoint& pos, const wxSize& size, long style, + const wxValidator& validator, const wxString& name) { if (!wxTextCtrlBase::Create(parent, id, pos, size, - style|wxFULL_REPAINT_ON_RESIZE)) + style|wxFULL_REPAINT_ON_RESIZE, + validator, name)) return false; if (!GetFont().Ok()) @@ -137,6 +141,7 @@ bool wxRichTextCtrl::Create( wxWindow* parent, wxWindowID id, const wxString& va if (style & wxTE_READONLY) SetEditable(false); + // The base attributes must all have default values wxTextAttrEx attributes; attributes.SetFont(GetFont()); attributes.SetTextColour(*wxBLACK); @@ -145,6 +150,8 @@ bool wxRichTextCtrl::Create( wxWindow* parent, wxWindowID id, const wxString& va attributes.SetLineSpacing(10); attributes.SetParagraphSpacingAfter(10); attributes.SetParagraphSpacingBefore(0); + attributes.SetTextEffects(0); + attributes.SetTextEffectFlags(wxTEXT_ATTR_EFFECT_STRIKETHROUGH|wxTEXT_ATTR_EFFECT_CAPITALS); SetBasicStyle(attributes);