Wolfgang Bures
Wolfgang Bures

Reputation: 717

Why does a published event on my form not show in the editor

I have added a published event to my main form, expeecting it would show up in the editor, but it doesn't. Am I doing something wrong, or is this just not the case?

THIFISongEndEvent = procedure(Sender: TObject; EstimatedEndTime: TDateTime) of object;

  TMain = class(TForm)
[...]
  published
    property OnSongEnd: THIFISongEndEvent read FOnSongEnd write SetOnSongEnd;

EDIT: Added Code

Upvotes: 0

Views: 166

Answers (1)

Uwe Raabe
Uwe Raabe

Reputation: 47714

Published properties of TComponent descendants are visible in the Object Inspector only when these components are registered in a design-time package. Otherwise, you would not even be able to drop the component onto the Form.

As Forms are usually designed in the Form Designer, they are probably not registered for design-time, and thus their published properties added on top of the base TForm properties cannot be known by the Object Inspector.

Upvotes: 5

Related Questions