我试图将自定义属性添加到可通过Delphi属性编辑器访问的基本表单。如果我只是像使用标准组件那样简单地添加属性,则该属性将不会显示在属性编辑器中。这是我尝试过的:
unit TestForm;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs;
type
TfrmEasyIPBase = class(TForm)
private
FTest: String;
public
{ Public declarations }
published
property Test: String read FTest write FTest;
end;
var
frmEasyIPBase: TfrmEasyIPBase;
implementation
{$R *.dfm}
end.
我是否必须在某个时候注册属性(property)?
最佳答案
RegisterCustomModule应该可以解决问题。
关于delphi - 如何将自定义属性添加到窗体,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/909532/