Add support for "hint" property in wxTextCtrl XRC handler.
It is convenient to allow specifying the hints directly in the resources. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76628 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -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:
|
||||
|
||||
|
@@ -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
|
||||
|
||||
|
||||
|
@@ -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 }*
|
||||
}
|
||||
|
||||
|
||||
|
@@ -72,6 +72,8 @@ wxObject *wxTextCtrlXmlHandler::DoCreateResource()
|
||||
if (HasParam(wxT("maxlength")))
|
||||
text->SetMaxLength(GetLong(wxT("maxlength")));
|
||||
|
||||
text->SetHint(GetText(wxS("hint")));
|
||||
|
||||
return text;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user