Replaced 'InlineHelp' property attribute with 'Hint'; Use SetHint() wxTextCtrl and wxComboCtrl member function to set it; Added a small section about help string and hint text in propgrid overview
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62990 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -546,10 +546,17 @@ wxPG_PROP_BEING_DELETED = 0x00200000
|
||||
*/
|
||||
#define wxPG_ATTR_UNITS wxS("Units")
|
||||
|
||||
/** Universal, string. When set, will be shown in property's value cell
|
||||
when displayed value string is empty, or value is unspecified.
|
||||
/** When set, will be shown as 'greyed' text in property's value cell when
|
||||
the actual displayed value is blank.
|
||||
*/
|
||||
#define wxPG_ATTR_HINT wxS("Hint")
|
||||
|
||||
#if wxPG_COMPATIBILITY_1_4
|
||||
/**
|
||||
@deprecated Use "Hint" (wxPG_ATTR_INLINE_HELP) instead.
|
||||
*/
|
||||
#define wxPG_ATTR_INLINE_HELP wxS("InlineHelp")
|
||||
#endif
|
||||
|
||||
/** Universal, wxArrayString. Set to enable auto-completion in any
|
||||
wxTextCtrl-based property editor.
|
||||
@@ -683,8 +690,12 @@ wxPG_PROP_BEING_DELETED = 0x00200000
|
||||
#define wxPG_ATTR_MAX wxPGGlobalVars->m_strMax
|
||||
#undef wxPG_ATTR_UNITS
|
||||
#define wxPG_ATTR_UNITS wxPGGlobalVars->m_strUnits
|
||||
#undef wxPG_ATTR_HINT
|
||||
#define wxPG_ATTR_HINT wxPGGlobalVars->m_strHint
|
||||
#if wxPG_COMPATIBILITY_1_4
|
||||
#undef wxPG_ATTR_INLINE_HELP
|
||||
#define wxPG_ATTR_INLINE_HELP wxPGGlobalVars->m_strInlineHelp
|
||||
#endif
|
||||
|
||||
#endif // !SWIG
|
||||
|
||||
@@ -1638,6 +1649,11 @@ public:
|
||||
return GetValueAsString(0);
|
||||
}
|
||||
|
||||
/**
|
||||
Returns property's hint text (shown in empty value cell).
|
||||
*/
|
||||
inline wxString GetHintText() const;
|
||||
|
||||
/** Returns property grid where property lies. */
|
||||
wxPropertyGrid* GetGrid() const;
|
||||
|
||||
|
@@ -87,7 +87,10 @@ public:
|
||||
wxPGCachedString m_strMin;
|
||||
wxPGCachedString m_strMax;
|
||||
wxPGCachedString m_strUnits;
|
||||
wxPGCachedString m_strHint;
|
||||
#if wxPG_COMPATIBILITY_1_4
|
||||
wxPGCachedString m_strInlineHelp;
|
||||
#endif
|
||||
|
||||
// If true then some things are automatically translated
|
||||
bool m_autoGetTranslation;
|
||||
@@ -2146,6 +2149,22 @@ inline unsigned int wxPropertyGridPageState::GetActualVirtualHeight() const
|
||||
}
|
||||
#endif
|
||||
|
||||
wxString wxPGProperty::GetHintText() const
|
||||
{
|
||||
wxVariant vHintText = GetAttribute(wxPGGlobalVars->m_strHint);
|
||||
|
||||
#if wxPG_COMPATIBILITY_1_4
|
||||
// Try the old, deprecated "InlineHelp"
|
||||
if ( vHintText.IsNull() )
|
||||
vHintText = GetAttribute(wxPGGlobalVars->m_strInlineHelp);
|
||||
#endif
|
||||
|
||||
if ( !vHintText.IsNull() )
|
||||
return vHintText.GetString();
|
||||
|
||||
return wxEmptyString;
|
||||
}
|
||||
|
||||
inline int wxPGProperty::GetDisplayedCommonValueCount() const
|
||||
{
|
||||
if ( HasFlag(wxPG_PROP_USES_COMMON_VALUE) )
|
||||
|
Reference in New Issue
Block a user