Thema: Delphi ListBox & Edit

Einzelnen Beitrag anzeigen

Benutzerbild von Neutral General
Neutral General

Registriert seit: 16. Jan 2004
Ort: Bendorf
5.219 Beiträge
 
Delphi 10.2 Tokyo Professional
 
#5

Re: ListBox & Edit

  Alt 6. Sep 2006, 18:39
Delphi-Quellcode:
procedure TForm1.ListBox1Click(Sender: TObject);
var i: Integer;
    tmp: String;
begin
  i:= 1;
  tmp := ListBox1.Items[ListBox1.ItemIndex] + '_';
  repeat
    if FindComponent('Edit' + IntToStr(i) = nil then exit;
    (FindComponent('Edit' + IntToStr(i)) as TEdit).Text := copy(tmp,1,pos('_',tmp)-1);
    delete(tmp,1,pos('_',tmp));
    inc(i);
  until Length(tmp) = 0;
end;
Ich habe fertig

Gruß
Neutral General
Michael
"Programmers talk about software development on weekends, vacations, and over meals not because they lack imagination,
but because their imagination reveals worlds that others cannot see."
  Mit Zitat antworten Zitat