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
Using pre-defined events
TComponentInspector cannot retreive the available events automatically, so the event list must be filled in the application using OnGetValuesList event.
type
  TMainForm = class(TForm)
    ComponentInspector: TComponentInspector;
    Button: TButton;
    InfoLabel: TLabel;
    procedure ShowYes(Sender: TObject);
    procedure ShowNo(Sender: TObject);
    procedure ComponentInspectorGetValuesList(Sender: TObject;
      TheIndex: Integer; const Strings: TStrings);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

...

procedure TMainForm.ShowYes(Sender: TObject);
begin
  ShowMessage('YES - YES - YES');
end;

procedure TMainForm.ShowNo(Sender: TObject);
begin
  ShowMessage('NO - NO - NO');
end;

procedure TMainForm.ComponentInspectorGetValuesList(Sender: TObject;
  TheIndex: Integer; const Strings: TStrings);
begin
  with ComponentInspector.Properties[TheIndex] do
    if (TypeKind=tkMethod) and (PropType=TypeInfo(TNotifyEvent)) then
      with Strings do
      begin
        Add('ShowYes');
        Add('ShowNo');
      end;
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