Index: components/ideintf/objectinspector.pp =================================================================== --- components/ideintf/objectinspector.pp (revision 65222) +++ components/ideintf/objectinspector.pp (working copy) @@ -269,6 +269,7 @@ private FBackgroundColor: TColor; FColumn: TOICustomPropertyGridColumn; + FCompareFunc: TListSortCompare; FGutterColor: TColor; FGutterEdgeColor: TColor; FHighlightColor: TColor; @@ -505,6 +506,7 @@ property BorderStyle default bsSingle; property Column: TOICustomPropertyGridColumn read FColumn write SetColumn; + property CompareFunc: TListSortCompare read FCompareFunc write FCompareFunc; property CurrentEditValue: string read GetCurrentEditValue write SetCurrentEditValue; property DefaultItemHeight:integer read FDefaultItemHeight @@ -1012,6 +1014,7 @@ FItemIndex:=-1; FStates:=[]; FColumn := oipgcValue; + FCompareFunc := @SortGridRows; FRows:=TFPList.Create; FExpandingRow:=nil; FDragging:=false; @@ -1974,7 +1977,7 @@ @AddPropertyEditor, @EditorFilter); end; // sort - FRows.Sort(@SortGridRows); + FRows.Sort(FCompareFunc); for a:=0 to FRows.Count-1 do begin if a>0 then Rows[a].FPriorBrother:=Rows[a-1] @@ -2191,7 +2194,7 @@ Index: Integer; Next: TOIPropertyGridRow; begin - if not ParentRow.Sort(@SortGridRows) then exit; + if not ParentRow.Sort(FCompareFunc) then exit; // update FRows Item:=ParentRow.FirstChild; Index:=ParentRow.Index+1;