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
Filtering the properties
TComponentInspector has an advanced filtering feature. By default the filtering is used for switching between properties and events mode, but this can be changed or improved using OnFilter event. In the following example the user can switch the filtering between "all properties" (default filtering), "string properties", "integer properties" and "boolean properties" modes by 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.ComponentInspectorFilter(Sender: TObject; 
  Prop: TProperty; var Result: Boolean);
begin
  // we analyse the TypeKind of the passed property;
  // when RadioGroup.ItemIndex is 0 ("all properties")
  // we use the default filtering (Result is not changed)
  with Prop do
    case RadioGroup.ItemIndex of
      1: Result:=TypeKind in [tkString,tkLString,tkWString];
      2: Result:=TypeKind in [tkInteger];
      3: Result:=PropType=TypeInfo(Boolean);
    end;
end;

procedure TMainForm.RadioGroupClick(Sender: TObject);
begin
  ComponentInspector.RefreshList;
end;
Any properties of the passed Prop can be analysed and any property of the edited component can be hidden and shown.

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