delphi
143.1.21.111/D1,P01,01,M1 143.1.21.112/D2,P02,02,M1 143.1.21.110/D3,P03,03,M1 143.1.21.113/D4,P04,04,M2 143.1.21.114/D5,P05,05,M2 143.1.21.115/D6,P06,06,M2 143.1.21.116/D7,P07,07,CRC 143.1.21.117/D8,P08,08,DGET 143.1.21.118/D9,P09,09,DGET 143.1.21.119/D10,P10,10,COMEDOR1 143.1.21.120/D11,P11,11,COMEDOR2 143.1.21.121/D12,P12,12,M1 143.1.21.122/D13,P13,13,DGTT1 143.1.21.123/D14,P14,14,DGTT2 143.1.21.124/D15,P15,15,DGMCCV 143.1.21.125/D16,P16,16,PEAJE
El code es:
delphi
procedure TForm1.FormCreate(Sender: TObject); var Txt: String; ListaIP: TStringList; i: Integer; begin Txt := ExtractFilePath(Application.ExeName) +'IP.txt'; ListaIP := TStringList.Create; ListaIP.LoadFromFile(Txt); for i := 0 to ListaIP.Count -1 do begin with TButton.Create(self) do begin Name := 'Reloj'+ IntToStr(i); Caption := Copy(ListaIP.Strings[i],0,12); Parent := pnBase; Left := 0 + Left; end; end; end;
Los problemas que se me presentan son los siguientes:
1. El caption del button no me aparece nada.
2. No sé como colocar los componentes uno al lado del otro y al llegar al final continúe hacia abajo.
Espero se entienda.
Saludos.