Added Description Box Height to saveable/restoreable editable state

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56074 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Jaakko Salli
2008-10-04 10:59:06 +00:00
parent a5d567622f
commit 6280517046
5 changed files with 85 additions and 5 deletions

View File

@@ -1012,6 +1012,11 @@ wxString wxPropertyGridInterface::SaveEditableState( int includedStates ) const
else
result += wxS("0;");
}
if ( includedStates & DescBoxState )
{
wxVariant v = GetEditableStateItem(wxS("descboxheight"));
result += wxString::Format(wxS("descboxheight=%i;"), (int)v.GetLong());
}
result.RemoveLast(); // Remove last semicolon
result += wxS("|");
}
@@ -1149,6 +1154,21 @@ bool wxPropertyGridInterface::RestoreEditableState( const wxString& src, int res
}
}
}
else if ( key == wxS("descboxheight") )
{
if ( restoreStates & DescBoxState )
{
long descBoxHeight;
if ( values.size() == 1 && values[0].ToLong(&descBoxHeight) )
{
SetEditableStateItem(wxS("descboxheight"), descBoxHeight);
}
else
{
res = false;
}
}
}
else
{
res = false;