Delphi/CB
•  Greatis •  Security •  AppDatabase •  Utilities •  Visual Basic • .NET •  just4fun
Delphi / C++ Builder
Components, utilities and tips for Delphi and C++ Builder developers
More info
Object Inspector FAQ
Object Inspector Home
Delphi Components
See also
Products
Form Designer
Runtime Fusion
Print Suite
Commented Image
Image Editor  new!
Delphi Toys
Ultimate Pack  hot!

FAQs
Form Designer FAQ
Print Suite FAQ
Image Editor FAQ

Links
Software for .NET
Software for VB 6
Delphi Tips & Tricks

Services
Outsourcing
Sorting the properties
By default all properties in the inspector are sorted in the alphabetical order, but the order can be changed by OnCompare event. In the following example the user can sort items by name or by type using the radio group component. The RefreshList method of the inspector must be called to apply changes and we do it in the OnClick event of the radio group component.
procedure TMainForm.ComponentInspectorCompare(Sender: TObject; 
  Prop1, Prop2: TProperty; var Result: Integer);
begin
  if RadioGroup.ItemIndex=1 then
    if Integer(Prop1.PropType)<Integer(Prop2.PropType) then Result:=-1
    else
      if Integer(Prop1.PropType)>Integer(Prop2.PropType) then Result:=1;
end;

procedure TMainForm.RadioGroupClick(Sender: TObject);
begin
  ComponentInspector.RefreshList;
end;

Greatis Software Greatis | Security | AppDatabase | Utilities | Delphi/CB | Visual Basic | .NET | just4fun

Contacts | Add to Favorites | Recommend to a Friend | Privacy Policy | Copyright © 1998-2008 Greatis Software