Hola compañeros, vengo con esta pequeña duda, estoy creando componentes en tiempo de ejecución, ¿existe alguna forma de crearle un evento como OnClick y llamarlo?.
Saludos.
EDITO: se me olvidó el código:
Código Delphi
[-]constructor TPanel1.Create(aOwner: TComponent);
begin
inherited;
with TLabel.Create(aOwner) do
begin
Parent := Self;
Caption := ID;
Font.Name := 'Tahoma';
Font.Size := 8;
Font.Color := clBlack;
Top := 0;
end;
with TLabel.Create(aOwner) do
begin
Parent := Self;
Caption := AUTOR;
Top := 30;
end;
with TImage.Create(aOwner) do
begin
Parent := Self;
Align := alClient;
Picture.LoadFromFile(FOTO);
Stretch := True;
end;
Width := 200;
Height := 200;
end;