diff --git a/docs/doxygen/overviews/xrc_format.h b/docs/doxygen/overviews/xrc_format.h index 06c06951a8..e5178a13d9 100644 --- a/docs/doxygen/overviews/xrc_format.h +++ b/docs/doxygen/overviews/xrc_format.h @@ -1930,19 +1930,17 @@ a single wxSizer child with non-ribbon windows in it. @hdr3col{property, type, description} @row3col{value, @ref overview_xrcformat_type_text, Initial value of the control (default: empty).} -@row3col{maxlength, integer, - Maximum length of the text entered (default: unlimited).} @endTable -Notice that wxRichTextCtrl support in XRC is available in wxWidgets 2.9.5 and -later only and you need to explicitly register its handler using +Notice that you need to explicitly register the handler using @code #include - AddHandler(new wxRichTextCtrl); + AddHandler(new wxRichTextCtrlXmlHandler); @endcode to use it. +@since 2.9.5 @subsubsection xrc_wxscrollbar wxScrollBar diff --git a/misc/schema/xrc_schema.rnc b/misc/schema/xrc_schema.rnc index 7a2a715142..b38c47f651 100644 --- a/misc/schema/xrc_schema.rnc +++ b/misc/schema/xrc_schema.rnc @@ -1404,8 +1404,7 @@ wxRichTextCtrl = attribute class { "wxRichTextCtrl" } & stdObjectNodeAttributes & stdWindowProperties & - [xrc:p="o"] element value {_, t_text }* & - [xrc:p="o"] element maxlength {_, t_integer }* + [xrc:p="o"] element value {_, t_text }* } diff --git a/src/xrc/xh_richtext.cpp b/src/xrc/xh_richtext.cpp index 92930111c1..f9985e0abc 100644 --- a/src/xrc/xh_richtext.cpp +++ b/src/xrc/xh_richtext.cpp @@ -24,7 +24,9 @@ wxRichTextCtrlXmlHandler::wxRichTextCtrlXmlHandler() : wxXmlResourceHandler() XRC_ADD_STYLE(wxTE_PROCESS_TAB); XRC_ADD_STYLE(wxTE_MULTILINE); XRC_ADD_STYLE(wxTE_READONLY); - XRC_ADD_STYLE(wxTE_AUTO_URL); + + XRC_ADD_STYLE(wxRE_CENTRE_CARET); + XRC_ADD_STYLE(wxRE_READONLY); AddWindowStyles(); } @@ -43,9 +45,6 @@ wxObject *wxRichTextCtrlXmlHandler::DoCreateResource() SetupWindow(text); - if (HasParam(wxT("maxlength"))) - text->SetMaxLength(GetLong(wxT("maxlength"))); - return text; }