Registriert seit: 18. Aug 2004
Ort: Edewecht
712 Beiträge
Delphi 5 Professional
|
Re: ListBox: Item Selektieren?
21. Dez 2004, 13:56
Für MultiSelect:
Delphi-Quellcode:
procedure TForm1.ListBox1Click(Sender: TObject);
var
I: Integer;
begin
Memo1.Clear;
for I := 0 to ListBox1.Items.Count - 1 do
begin
if ListBox1.Selected[I] then
Memo1.Lines.Add(ListBox1.Items[I]);
end;
end;
Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
begin
ListBox1.Selected[2] := True;
ListBox1.Selected[4] := True;
end;
Ciao, Sprint.
"I don't know what I am doing, but I am sure I am having fun!"
|