diff --git a/docs/changes.txt b/docs/changes.txt index 27f23deb7e..421f13d163 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -176,6 +176,7 @@ All (GUI): - Add wxFontPickerCtrl::SetMinPointSize() (Andreas Falkenhahn). - Add Set/GetFooter/Text/Icon() to wxRichMessageDialog (Tobias Taschner) - Add wxFloatingPointValidator::SetFactor(). +- Add "hint" property to wxSearchCtrl XRC handler. wxGTK: diff --git a/docs/doxygen/overviews/xrc_format.h b/docs/doxygen/overviews/xrc_format.h index 75a9f54815..92cea1ff7c 100644 --- a/docs/doxygen/overviews/xrc_format.h +++ b/docs/doxygen/overviews/xrc_format.h @@ -1950,6 +1950,9 @@ child and the second one for right/bottom child window. @hdr3col{property, type, description} @row3col{value, @ref overview_xrcformat_type_text, Initial value of the control (default: empty).} +@row3col{hint, @ref overview_xrcformat_type_text, + Descriptive text shown in the empty control (default: "Search"). This + property is new since wxWidgets 3.1.1.} @endTable diff --git a/src/xrc/xh_srchctrl.cpp b/src/xrc/xh_srchctrl.cpp index dbaafdedde..122d38cfbc 100644 --- a/src/xrc/xh_srchctrl.cpp +++ b/src/xrc/xh_srchctrl.cpp @@ -49,6 +49,10 @@ wxObject *wxSearchCtrlXmlHandler::DoCreateResource() SetupWindow(ctrl); + const wxString& hint = GetText(wxS("hint")); + if ( !hint.empty() ) + ctrl->SetDescriptiveText(hint); + return ctrl; }