Autor Beitrag
Alex
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 28


D5 Epr
BeitragVerfasst: Mi 05.11.03 17:20 
Hallo

Über den Index der Listbox lade ich Grafiken auf eine Image-Komponennte; das funktioniert auch soweit ganz gut. Jetzt möchte ich die Bilder automatisch nacheinander anzeigen lassen also mit Index 0 soll begonnen werden und nach 5 sec soll der nächste usw. bis zum letzten Index durchlaufen werden.

kann mir da jemand helfen ?

Danke im Voraus
Alex
JoelH
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 806
Erhaltene Danke: 17

Win10
Delphi Alexandria 11.2 Patch 1
BeitragVerfasst: Mi 05.11.03 18:32 
Titel: hmm,
guck dir mal die Timerkomponente an

www.delphi-forum.de/...&highlight=timer

in dem Topic solltest du alles finden was du suchst.

_________________
mfg. Joel
Alex Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 28


D5 Epr
BeitragVerfasst: Do 06.11.03 11:33 
das mit dem Timer hab ich auch schon überlegt.
ich hab eine Listbox mit ca. 20 einträgen
wenn ich dann mit den Pfeil oder der Maus auf einem klicke dann
kommt mein Aufruf
ausblenden Quelltext
1:
2:
3:
If  ListBox1.ItemIndex = (1)
then
Image1.Picture.LoadFromFile('c:\ordner\b1.jpg');


usw.
jetzt möcht ich das ganze aber 'per button' automatisch ablaufen lassen
so ähnlich wie eine Dia-Show, komm aber nicht dahinter wie ich das am einfachsten mach :roll:

Gr, Alex
Terra23
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 872

Win 8
Delphi 7
BeitragVerfasst: Do 06.11.03 13:09 
Du nimmst den Timer, stellst den Intervall auf 500 und schreibst in den Code:

ausblenden Delphi-Quelltext
1:
2:
ListBox1.ItemIndex:=ListBox1.ItemIndex+1;
Image1.Picture.LoadFromFile(ListBox1.Items[ListBox1.ItemIndex]);


... ich gehe davon aus, daß du die Dateinamen in der ListBox hast?!?

Wenn du ganz besonders "geschickt" sein willst, fragst du vorher noch die Anzahl der Items und den ItemIndex aus, damit deine Diashow auch wieder von vorn beginnen kann und keine Exception kommt..

_________________
Hasta La Victoria Siempre
Alex Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 28


D5 Epr
BeitragVerfasst: Do 06.11.03 17:35 
Hallo Terra23
Danke das hilft mir sehr weiter :D
Gruß, Alex