The control TCarpeta works fine along, but when trying to activate from
Tfolders doesn't work.
Here is the code
hope can help me
TCarpeta=Class(TTabSheet)
Envio:TCopiarA;
Recepcion:TRecibir;
public
constructor Create(AOwner: TComponent); override;
end;
TFolders=Class(TPageControl)
AES:TCarpeta;
public
constructor Create(AOwner: TComponent); override;
end;
constructor TFolders.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
Align := alClient;
PageControl1:=Self;
AES=TCarpeta.Create(Self);
AES.Parent:=Self;
AES.PageControl := Self;
AES.Caption := 'AES';
AES.TabVisible:=True;
height:=240;
width:= 590;
end;
You haven't got a parent in the constructor - so you have to move every code,
that needs a windows handle to another procedure in your component.
Take a look a virtual method "Loaded". Override it in your comp and do the
offending stuff there. This routine is called after Loading of component is done
and at this time you'll have a valid parent.
HTH
Bernd
--
Bernd Ua - Software-Haus Brumund GmbH
u...@nospambrumund.de
// to reply, remove nospam from email adress :-)
// obviously this needs to be stated, too : please no unsolicited private email
unless explicitly invited
constructor YourComp.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
............
end;
Gustavo Morales Gámez wrote:
> ------------------------------------------------------------------------
>
> Ing. Gustavo Morales Gámez <gmor...@aduanet.net>
> Ing.
> Aduanet, S.A. de C.V.
> Operaciones
>
> Ing. Gustavo Morales Gámez
> Ing. <gmor...@aduanet.net>
> Aduanet, S.A. de C.V.
> Operaciones
> Av. Cesar Lopez de Lara No. 3603 /107 Calle del Norte Fountain Centre Unit 11-B Fax: (87) 14-7700/(956) 718-0775
> Laredo Work: (87) 15-49-60 /(956) 718-0775
> Texas
> 78041
> U.S.A.
> Additional Information:
> Last Name Morales Gámez
> First NameGustavo Antonio
> Version 2.1
constructor TFolders.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
Parent := AOwner AS TWinControl; { *** ADD THIS LINE *** }
Align := alClient;
...
end;
Micheus.
Dennis Coleman escreveu na mensagem <3727588E...@nais.com>...