Added wxPGProperty::SetDefaultValue(v), as a shortcut for SetAttribute(DefaultValue, v)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60828 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -639,6 +639,8 @@ wxPG_PROP_CLASS_SPECIFIC_2 = 0x00100000
|
||||
*/
|
||||
|
||||
// Redefine attribute macros to use cached strings
|
||||
#undef wxPG_ATTR_DEFAULT_VALUE
|
||||
#define wxPG_ATTR_DEFAULT_VALUE wxPGGlobalVars->m_strDefaultValue
|
||||
#undef wxPG_ATTR_MIN
|
||||
#define wxPG_ATTR_MIN wxPGGlobalVars->m_strMin
|
||||
#undef wxPG_ATTR_MAX
|
||||
@@ -1854,6 +1856,14 @@ public:
|
||||
void SetTextColour( const wxColour& colour,
|
||||
bool recursively = false );
|
||||
|
||||
/** Set default value of a property. Synonymous to
|
||||
|
||||
@code
|
||||
SetAttribute("DefaultValue", value);
|
||||
@endcode
|
||||
*/
|
||||
void SetDefaultValue( wxVariant& value );
|
||||
|
||||
#ifndef SWIG
|
||||
/** Sets editor for a property.
|
||||
|
||||
|
@@ -74,6 +74,7 @@ public:
|
||||
wxPGCachedString m_strbool;
|
||||
wxPGCachedString m_strlist;
|
||||
|
||||
wxPGCachedString m_strDefaultValue;
|
||||
wxPGCachedString m_strMin;
|
||||
wxPGCachedString m_strMax;
|
||||
wxPGCachedString m_strUnits;
|
||||
@@ -1849,6 +1850,11 @@ inline int wxPGProperty::GetDisplayedCommonValueCount() const
|
||||
return 0;
|
||||
}
|
||||
|
||||
inline void wxPGProperty::SetDefaultValue( wxVariant& value )
|
||||
{
|
||||
SetAttribute(wxPG_ATTR_DEFAULT_VALUE, value);
|
||||
}
|
||||
|
||||
inline void wxPGProperty::SetEditor( const wxString& editorName )
|
||||
{
|
||||
m_customEditor = wxPropertyGridInterface::GetEditorByName(editorName);
|
||||
|
Reference in New Issue
Block a user