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:
@@ -176,6 +176,7 @@ All (GUI):
|
|||||||
- Add wxFontPickerCtrl::SetMinPointSize() (Andreas Falkenhahn).
|
- Add wxFontPickerCtrl::SetMinPointSize() (Andreas Falkenhahn).
|
||||||
- Add Set/GetFooter/Text/Icon() to wxRichMessageDialog (Tobias Taschner)
|
- Add Set/GetFooter/Text/Icon() to wxRichMessageDialog (Tobias Taschner)
|
||||||
- Add wxFloatingPointValidator::SetFactor().
|
- Add wxFloatingPointValidator::SetFactor().
|
||||||
|
- Add "hint" property to wxSearchCtrl XRC handler.
|
||||||
|
|
||||||
wxGTK:
|
wxGTK:
|
||||||
|
|
||||||
|
@@ -1950,6 +1950,9 @@ child and the second one for right/bottom child window.
|
|||||||
@hdr3col{property, type, description}
|
@hdr3col{property, type, description}
|
||||||
@row3col{value, @ref overview_xrcformat_type_text,
|
@row3col{value, @ref overview_xrcformat_type_text,
|
||||||
Initial value of the control (default: empty).}
|
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
|
@endTable
|
||||||
|
|
||||||
|
|
||||||
|
@@ -49,6 +49,10 @@ wxObject *wxSearchCtrlXmlHandler::DoCreateResource()
|
|||||||
|
|
||||||
SetupWindow(ctrl);
|
SetupWindow(ctrl);
|
||||||
|
|
||||||
|
const wxString& hint = GetText(wxS("hint"));
|
||||||
|
if ( !hint.empty() )
|
||||||
|
ctrl->SetDescriptiveText(hint);
|
||||||
|
|
||||||
return ctrl;
|
return ctrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user