Přidat otázku mezi oblíbenéZasílat nové odpovědi e-mailemVyřešeno Delphi - button

Chybku jsem tam mněl :-[

procedure TForm1.FormCreate(Sender: TObject);
var
 TS: TStringList;
 B: TButton;
 s,m:string;
 i:integer;
begin
  TS := TStringList.Create;
  TS.LoadFromFile('setup.txt');

  for i  := 0 to TS.Count-1 do
  begin
    s:= TS[i];
    B := TButton.Create(Self);
    B.Caption := Format(Copy(s, 1, Pos(',', s)-1), [i]);
    m := Copy(s, Pos(',', s) + 1, MaxInt);
    B.Parent := Self;
    B.Height := 23;
    B.Width := 100;
    B.Left := 10;
    B.Top := 10 + i * 25;
    B.OnClick := Form1.Button1Click;
  end;
  TS.Free;
end;

Reakce na odpověď

1 Zadajte svou přezdívku:
2 Napište svou odpověď:
3 Pokud chcete dostat ban, zadejte libovolný text:

Zpět do poradny