criando um dbedit em tempo de execução
como eu crio um dbedit em tempo de execução?
Obrigado!
Obrigado!
Linhares
Curtidas 0
Respostas
Lucas Silva
12/01/2004
Vou te dar uma dica, não sei se dar p/ aplicar neste caso seu...
Olha só, você pode colocar o Visible dele pra false, e depois você passa pra True.
Espero ter ajudado.
Lucas!
Olha só, você pode colocar o Visible dele pra false, e depois você passa pra True.
Espero ter ajudado.
Lucas!
GOSTEI 0
Nigro
12/01/2004
Segue exemplo com outro componente, basta adapatar.
procedure TForm1.BotaoCriaOnClick(Sender : TObject);
Var
Button : TButton;
begin
Button := TButton.Create(Form);
with Button do
begin
Parent := Form;
height := 32;
width := 128;
caption := ´Click em mim!´;
left := (Form.ClientWidth - width) div 2;
top := (Form.ClientHeight - height) div 2;
end;
end;
procedure TForm1.BotaoCriaOnClick(Sender : TObject);
Var
Button : TButton;
begin
Button := TButton.Create(Form);
with Button do
begin
Parent := Form;
height := 32;
width := 128;
caption := ´Click em mim!´;
left := (Form.ClientWidth - width) div 2;
top := (Form.ClientHeight - height) div 2;
end;
end;
GOSTEI 0
Gilbertoscruz
12/01/2004
[b:2a6acfae0e]Procedure[/b:2a6acfae0e] TForm1.CriaComponents;
[b:2a6acfae0e]var[/b:2a6acfae0e]
Edt: TDBEdit;
[b:2a6acfae0e]Begin[/b:2a6acfae0e]
Edt := TDBEdit.Create(Self);
Edt.Parent := Self;
Edt.SetBounds(Left, Top, Width, Height);
[b:2a6acfae0e]End;[/b:2a6acfae0e]
blz !!
[b:2a6acfae0e]var[/b:2a6acfae0e]
Edt: TDBEdit;
[b:2a6acfae0e]Begin[/b:2a6acfae0e]
Edt := TDBEdit.Create(Self);
Edt.Parent := Self;
Edt.SetBounds(Left, Top, Width, Height);
[b:2a6acfae0e]End;[/b:2a6acfae0e]
blz !!
GOSTEI 0