我创建了一个自定义控件,继承自TCustomControl
并发布Align
了TControl
. 但是,当我在 C++Builder 项目中使用这个自定义控件时,它引发了异常
Project Launcher.exe raised exception class EReadError with message 'Property Align does not exist'.
这是自定义控件的代码。
unit GameListCtrl;
interface
uses
SysUtils, Classes, Controls;
type
TGameList = class(TCustomControl)
private
protected
procedure Paint; override;
public
{ Public declarations }
published
property Align default alLeft;
end;
implementation
{ TGameList }
procedure TGameList.Paint;
begin
inherited;
end;
end.