> I seem to be having some problem when creating a lable and an edit box
> dynamcially at run time.
> if I put the follwoing code on a buttons click event, the lable appears to
> be created, but not dipslayed....can anyone spot why ???
> var
> lbl:TLabel;
> begin
> lbl:=TLabel.create(self);
> lbl.caption:='Hello';
> lbl.top:=20;
> lbl.height:=30;
> lbl.left:=100;
> lbl.width:=50;
> lbl.visible:=true;
> lbl.font.color:=clBlack;
> lbl.color:=clbtnface;
No parent control set... try this...
with TLabel.Create(Self) do begin
Parent := Self;
Caption := 'Hello';
SetBounds(100,20,50,30);
Font.Color := clBlack;
Font.Color := clBtnFace; // This should be the same as form background by default
anyway.
end;
--
Aaron@home
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz