为什么在我的表格上发表的事件未在编辑中显示
我已经在我的主要表单中添加了一个已发布的事件,将其展示在编辑器中,但事实并非如此。 我是做错了什么,还是不是这样?
THIFISongEndEvent = procedure(Sender: TObject; EstimatedEndTime: TDateTime) of object;
TMain = class(TForm)
[...]
published
property OnSongEnd: THIFISongEndEvent read FOnSongEnd write SetOnSongEnd;
编辑:添加代码
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
tcomponent
后代的已发布属性仅在对象检查器中才能在这些组件中注册在设计时包中。否则,您甚至无法将组件放到表单上。由于通常在表单设计人员中设计表格,因此它们可能未注册用于设计时间,因此对象检查员无法知道其在基本
tform
属性之上添加的已发布属性。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.