Ver Mensaje Individual
  #1  
Antiguo 05-07-2019
Avatar de look
look look is offline
Miembro
 
Registrado: sep 2007
Ubicación: The Shire
Posts: 656
Reputación: 17
look Va camino a la fama
Agregar edit a ListboxItem

Hola amigos , estoy tratando de agregar un edit a un ListBox, esto es lo que tengo :

Código Delphi [-]
procedure TForm3.Button1Click(Sender: TObject);
var
  edt: TEdit;
  T: TListBoxItem;
begin

  edt := TEdit.Create(Self);
  edt.Name := 'edt1';
  edt.Text := 'hola';
  edt.Align := TAlignLayout.Client;

  T := TListBoxItem.Create(ListBox1);
  T.AddObject(edt);

  ListBox1.Items.AddObject('', T);

end;

Al probar el codigo agrega el item, pero el edit no aparece en el item.

que podra ser?
__________________
all your base are belong to us
Responder Con Cita