Autor Beitrag
Friedhelm
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 47



BeitragVerfasst: Fr 27.12.02 20:09 
Hallo zusammen,

ich möchte die in einer Listbox stehenden Items, z.B. fünf Einträge, verschiedenen Labels gleichzeitig zuordnen.

Es soll so sein, dass, wenn das Programm gestartet wird, die Labels aus der ListBox(Items) beschriftet werden.
Während des Hochfahrens fülle ich die ListBox mit 5 Einträgen.Das geht.
In LB 69 stehen die Einträge drin.

ausblenden Quelltext
1:
2:
3:
      Sparte.Listbox69.Items.Clear;
      Sparte.DirectoryListBox1.Directory :=  Form1.einst('startdir13');
      Sparte.Listbox69.Items  := Sparte.FileListBox1.Items;




Also 5 Items
5 Labels
Item 1 schreibt mir das vorhandene Label 1
Item 2 schreibt mir das vorhandene Label 2 usw.

Geht das vielleicht?

Danke für den Tip.

Gruss
Friedhelm
littlemike1005
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 187



BeitragVerfasst: Fr 27.12.02 20:50 
ich hoffe ich habe dich richtig verstanden.


ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
procedure TForm1.FormActivate(Sender: TObject);
begin
 label1.caption:=listbox1.Items[0];
 label2.caption:=listbox1.Items[1];
 label3.caption:=listbox1.Items[2];
 label4.caption:=listbox1.Items[3];
 label5.caption:=listbox1.Items[4];
end;


aber was meinst du mit dem satz
Zitat:
Während des Hochfahrens fülle ich die ListBox mit 5 Einträgen.Das geht.
In LB 69 stehen die Einträge drin.
Friedhelm Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 47



BeitragVerfasst: Fr 27.12.02 21:16 
Hallo ittlemike1005
danke für den Tip.

die Listbox fülle ich während des Hochfahrens mit der gezeigten Routine.
Die ListBox heisst bei mir LB69.
Sonst nichts. :P

Gruss Friedhelm