diff --git a/docs/changes.txt b/docs/changes.txt index a84b84d884..b69c42c9ec 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -606,6 +606,7 @@ All (GUI): - Fix selecting elements from wxPropertyGrid enum properties (Artur Wieczorek). - Don't show the dialog twice for colours in wxPropertyGrid (Artur Wieczorek). - Fix handling of custom colours in wxPropertyGrid choices (Artur Wieczorek). +- Add "hint" property to wxTextCtrl XRC handler. wxGTK: diff --git a/docs/doxygen/overviews/xrc_format.h b/docs/doxygen/overviews/xrc_format.h index f2ebf4e64c..e70c12b671 100644 --- a/docs/doxygen/overviews/xrc_format.h +++ b/docs/doxygen/overviews/xrc_format.h @@ -1840,6 +1840,8 @@ No additional properties. Initial value of the control (default: empty).} @row3col{maxlength, integer, Maximum length of the text which can be entered by user (default: unlimited).} +@row3col{hint, @ref overview_xrcformat_type_text, + Hint shown in empty control (new since wxWidgets 3.0.1).} @endTable diff --git a/misc/schema/xrc_schema.rnc b/misc/schema/xrc_schema.rnc index cb2170ed96..5752b623a2 100644 --- a/misc/schema/xrc_schema.rnc +++ b/misc/schema/xrc_schema.rnc @@ -1199,7 +1199,8 @@ wxRichTextCtrl = stdObjectNodeAttributes & stdWindowProperties & [xrc:p="o"] element value {_, t_text }* & - [xrc:p="o"] element maxlength {_, t_integer }* + [xrc:p="o"] element maxlength {_, t_integer }* & + [xrc:p="o"] element hint {_, t_text }* } diff --git a/src/xrc/xh_text.cpp b/src/xrc/xh_text.cpp index 284e9b00f3..a50bd7e969 100644 --- a/src/xrc/xh_text.cpp +++ b/src/xrc/xh_text.cpp @@ -72,6 +72,8 @@ wxObject *wxTextCtrlXmlHandler::DoCreateResource() if (HasParam(wxT("maxlength"))) text->SetMaxLength(GetLong(wxT("maxlength"))); + text->SetHint(GetText(wxS("hint"))); + return text; }