Added wxPropertyGrid::SetSortFunction(); moved Sort() and SortChildren() to wxPropertyGridInterface; default sorting is now case-insensitive

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57894 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Jaakko Salli
2009-01-07 18:53:09 +00:00
parent 5f8704a6e3
commit 433969811e
10 changed files with 286 additions and 63 deletions

View File

@@ -762,6 +762,25 @@ bool wxPropertyGridInterface::Expand( wxPGPropArg id )
// -----------------------------------------------------------------------
void wxPropertyGridInterface::Sort()
{
wxPropertyGrid* pg = GetPropertyGrid();
pg->ClearSelection(false);
unsigned int pageIndex = 0;
for (;;)
{
wxPropertyGridPageState* page = GetPageState(pageIndex);
if ( !page ) break;
page->DoSort();
pageIndex++;
}
}
// -----------------------------------------------------------------------
void wxPropertyGridInterface::SetPropertyLabel( wxPGPropArg id, const wxString& newproplabel )
{
wxPG_PROP_ARG_CALL_PROLOG()