Autor Beitrag
Apo95
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 129

Win2000, WinXP, WinServer 2003 Standard x86, Win7x64
Delphi 6 Enterprise, D2009 Architect, RAD Studio XE6 Architect
BeitragVerfasst: Fr 02.11.12 01:20 
Hallo,

ich bin mal wieder ziemlich leer in der Birne...

ich würde gerne einem Label den Item einer ListBox zuweisen.

Hat jemand ne Idee?

Beste Grüße

_________________
Lette-Verein MIA
bummi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 1248
Erhaltene Danke: 187

XP - Server 2008R2
D2 - Delphi XE
BeitragVerfasst: Fr 02.11.12 01:46 
meinst Du so was?

ausblenden Delphi-Quelltext
1:
Label1.caption := Listbox1.Items[Listbox1.Itemindex];					

_________________
Das Problem liegt üblicherweise zwischen den Ohren H₂♂
DRY DRY KISS
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19314
Erhaltene Danke: 1747

W11 x64 (Chrome, Edge)
Delphi 11 Pro, Oxygene, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Fr 02.11.12 11:47 
Und am sinnvollsten prüft man vorher noch den ItemIndex, ob überhaupt etwas ausgewählt ist. sonst knallt es dann.