Add "hint" property to wxSearchCtrl XRC handler
This is similar to wxTextCtrl property of the same name and maps naturally to wxSearchCtrl descriptive text attribute.
This commit is contained in:
parent
8ee3394e5e
commit
652b4eb8ed
3 changed files with 8 additions and 0 deletions
|
|
@ -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:
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -49,6 +49,10 @@ wxObject *wxSearchCtrlXmlHandler::DoCreateResource()
|
|||
|
||||
SetupWindow(ctrl);
|
||||
|
||||
const wxString& hint = GetText(wxS("hint"));
|
||||
if ( !hint.empty() )
|
||||
ctrl->SetDescriptiveText(hint);
|
||||
|
||||
return ctrl;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue