如果属性是一个集合类型,在对象编辑器单击时出现下拉列表
要出现对话框的话你必须override TPropertyEditor的edit方法。
type TAbout=class(TPropertyEditor)
public
procedure Edit;override;
function getattributes:TPropertyAttributes;override;
function getvalue:string;override;
end;
....
published
property About:TAbout read FAbout;
end;
....
procedure TAbout.Edit;
begin
inherited;
ShowAboutWindow('Hello'); //出现对话框
end;
function TAbout.getattributes: TPropertyAttributes;
begin
Result := [paDialog, paReadOnly];
end;
function TAbout.getvalue: string;
begin
result:='About TStatusBarEx V1.0';
end;