Z
zysunit
Unregistered / Unconfirmed
GUEST, unregistred user!
TRzGroup = class( TCustomControl )
private
FOnClick: TNotifyEvent;
protected
procedure Click; virtual;
published
property OnClick: TNotifyEvent read FOnClick write FOnClick;
end
implementation
procedure TRzGroup.Click;
begin
// Call OnClick if assigned and not equal to associated action's OnExecute.
// If associated action's OnExecute assigned then call it, otherwise, call OnClick.
if Assigned( FOnClick ) and ( Action <> nil ) and ( @FOnClick <> @Action.OnExecute ) then
FOnClick( Self )
else if not ( csDesigning in Group.ComponentState ) and ( ActionLink <> nil ) then
begin
{$IFDEF VCL60_OR_HIGHER}
ActionLink.Execute( Group );
{$ELSE}
ActionLink.Execute;
{$ENDIF}
end
else if Assigned( FOnClick ) then
FOnClick( Self );
end;
以上程序不知道那里出了问题 我重新编译安装没有出现 onclick 事件 为何? 请高手指点
private
FOnClick: TNotifyEvent;
protected
procedure Click; virtual;
published
property OnClick: TNotifyEvent read FOnClick write FOnClick;
end
implementation
procedure TRzGroup.Click;
begin
// Call OnClick if assigned and not equal to associated action's OnExecute.
// If associated action's OnExecute assigned then call it, otherwise, call OnClick.
if Assigned( FOnClick ) and ( Action <> nil ) and ( @FOnClick <> @Action.OnExecute ) then
FOnClick( Self )
else if not ( csDesigning in Group.ComponentState ) and ( ActionLink <> nil ) then
begin
{$IFDEF VCL60_OR_HIGHER}
ActionLink.Execute( Group );
{$ELSE}
ActionLink.Execute;
{$ENDIF}
end
else if Assigned( FOnClick ) then
FOnClick( Self );
end;
以上程序不知道那里出了问题 我重新编译安装没有出现 onclick 事件 为何? 请高手指点