Utworzono niestandardowy formant odziedziczony po TCustomControl
i opublikowano właściwość Align
z TControl
. Jednak, gdy użyłem tego niestandardowego formantu w projekcie C++ Builder, że podniesiony wyjątek"Właściwość aliasu nie istnieje" po odziedziczeniu po TCustomControl
Project Launcher.exe raised exception class EReadError with message 'Property Align does not exist'.
Jest to kod do kontroli niestandardowej.
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.
Czy sprawdziłeś, że TCustomControl faktycznie odwołuje się do prawidłowego Vcl.Controls.TCustomControl? – Peter
@ PeterVonča Tak, odnosi się do Vcl.Controls.TCustomControl. – UltimaWeapon