Autor Beitrag
Starfighter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 51



BeitragVerfasst: Sa 03.05.03 21:08 
Wie kann man mit einem Button in der ListBox einen Runter gehen?

ausblenden Quelltext
1:
Listbox1.ItemIndex := +1 ;					


Es klappt leider nicht!! Der geht nur immer aufs 2te°!
Christian S.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 20451
Erhaltene Danke: 2264

Win 10
C# (VS 2019)
BeitragVerfasst: Sa 03.05.03 21:19 
Ich denke, Du solltest Dir mal die Hilfe zu TListBox.ItemIndex ansehen. Dort steht, dass ItemIndex die Nummer des ausgewählten Items angibt. Das heißt, mit ItemIndex:=1 wähst Du das Item mit der Nummer 1 aus. Da die Zählung bei 0 beginnt, ist es das zweite Item.

Das nächste Item auswählen kannst Du mit:
ausblenden Quelltext
1:
with listbox1 do itemindex:=itemindex+1;					


MfG,
Peter

P.S.: Demnächst bitte auch mal die Hilfe ausprobieren. :)

_________________
Zwei Worte werden Dir im Leben viele Türen öffnen - "ziehen" und "drücken".