Autor Beitrag
bluescreen25
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 27

WIN 2000, WIN XP
Delphi 7
BeitragVerfasst: Do 15.12.05 17:12 
hallo, in meinem MP3-Player habe ich eine Listbox, welche 12 Items anzeigen kann und die restlichen über scrollen....

Der abspielende Track wird bei mir farbig angezeigt.

Nun soll über einen Button die Listbox so gescrollt werden, das der abspielende Track mittig angezeigt wird, also kein automatisches mitlaufen, sondern erst bei Button-click.

Im Moment fällt mir dazu noch nichts gutes ein, da ja die Listbox variabel gefüllt sein kann und der sichtbare Bereich festgelegt ist.

PS: Ich arbeite erst seit 5 Wochen an Delphi.

_________________
...und ich dachte Delphi wäre ein Programmgenerator mit nur einem Button...
Tastaro
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 414
Erhaltene Danke: 23



BeitragVerfasst: Do 15.12.05 17:41 
Schau dir mal in der Delphi-Hilfe die Eigenschaft TopIndex von tlistbox an. Ich glaueb, dass du damit dein Problem lösen kannst.

Beste Grüße
Tastaro
bluescreen25 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 27

WIN 2000, WIN XP
Delphi 7
BeitragVerfasst: Do 15.12.05 17:55 
Danke, das war jetzt das Einfachste, was ich umgesetzt habe...

ausblenden Delphi-Quelltext
1:
PlayList_ListBox.TopIndex := PlayList_ListBox.Items.IndexOf(playsong_name)-5;					

_________________
...und ich dachte Delphi wäre ein Programmgenerator mit nur einem Button...