Criar Componente (Edit) em tempo de execução!

Delphi

06/08/2014

Existe alguma forma de criar um 'Edit', um 'Label' através de um Button?

EX: Tenho dois Campos, ou seja, dois Edit's que realizam uma operação em si seja soma ou subtração.
Se eu quiser adicionar mais um 'Edit', sem precisar deixar ele invisível ou desativado, existe essa possibilidade?
Marcos Silva

Marcos Silva

Curtidas 0

Melhor post

Renato Rubinho

Renato Rubinho

06/08/2014

Buenas,

Seguem exemplos:

var
  objLabel1: TLabel;
  objEdit1   : TEdit;
.
.
.
  // Label
  objLabel1 := TLabel.Create(<<Nome do Form onde será criado>>);

  with objLabel1 do
  begin
    Parent  := <<Nome do Form onde será criado>>;
    Name  := 'objLabel1';
    Caption := 'Caption';
    Left    := 16;
    Top     := 12;
    Width   := 233;
  end;

  // Edit
  objEdit1 := TEdit.Create(<<Nome do Form onde será criado>>);

  with objEdit1 do
  begin
    Parent := <<Nome do Form onde será criado>>;
    Text     := 'Text';
    Name  := 'objEdit1';
    Left     := 16;
    Top     := 32;
    Width  := 233;
  end;


Abraççç,
Renato
GOSTEI 1

Mais Respostas

Itamar Souza

Itamar Souza

06/08/2014

Boa tarde

veja se isso ajuda:
http://systemexplorer.net/pt/file-database/file/dbrtl140-bpl

att
GOSTEI 0
POSTAR