Autor Beitrag
WormHole
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 145



BeitragVerfasst: Di 02.08.05 17:52 
In einer Listbox stehen mehrere Namen z.B
Paul
Peter
Hans

Wenn jetzt einer von diesen Ausgewählt wird soll der Name in einem Memo erscheinen!
Wie geht das?
:lol:
Heiko
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3169
Erhaltene Danke: 11



BeitragVerfasst: Di 02.08.05 17:58 
1. Erstmal musst du auf ein Ereignis in der ListBox reagieren :arrow: OnClick-Ereignis.
2. Angeklickter String ermitteln :arrow: ListBox1.Items[ListBox1.ItemIndex]
3. String in das Memo einfügen :arrow:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
procedure TForm1.ListBox1Click(Sender: TObject);
begin
 Form1.Memo1.Lines.Add(Form1.ListBox1.Items[Form1.ListBox1.ItemIndex])
end;
WormHole Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 145



BeitragVerfasst: Di 02.08.05 18:02 
thank you.

ich versuchs gleich^^

EDIT: Hat geklappt ;)