Autor Beitrag
arminho
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 59



BeitragVerfasst: Mo 07.03.05 19:09 
gibt es eine Möglichkeit das hier mit ner Schleife zu lösen?
Es ändert sich jeweils nur die Combobox...

ausblenden volle Höhe Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
begin
  tempStringList := TStringList.Create;
  tempStringList.loadfromfile(ExtractFilePath(Application.ExeName)+'clubdateien\kader.txt'); //Datei laden
  tempStringList.Delete(0); // Zeile 'Name Age Nat St Tk Ps Sh Ag KAb TAb PAb SAb Gam Sav Ktk Kps Sht Gls Ass DP ' löschen !
  tempStringList.Delete(0); // Zeile' ----------------------------------------------------------------------------------------' löschen !
  for i := 0 to tempStringList.Count -1 do form10.combobox1.Items.Add(copy(tempStringList[i],1,pos(' ',tempStringList[i])));
  tempStringList.Free;
  begin
  tempStringList := TStringList.Create;
  tempStringList.loadfromfile(ExtractFilePath(Application.ExeName)+'clubdateien\kader.txt'); //Datei laden
  tempStringList.Delete(0); // Zeile 'Name Age Nat St Tk Ps Sh Ag KAb TAb PAb SAb Gam Sav Ktk Kps Sht Gls Ass DP ' löschen !
  tempStringList.Delete(0); // Zeile' ----------------------------------------------------------------------------------------' löschen !
  for i := 0 to tempStringList.Count -1 do form10.combobox2.Items.Add(copy(tempStringList[i],1,pos(' ',tempStringList[i])));
  tempStringList.Free;
  begin
  tempStringList := TStringList.Create;
  tempStringList.loadfromfile(ExtractFilePath(Application.ExeName)+'clubdateien\kader.txt'); //Datei laden
  tempStringList.Delete(0); // Zeile 'Name Age Nat St Tk Ps Sh Ag KAb TAb PAb SAb Gam Sav Ktk Kps Sht Gls Ass DP ' löschen !
  tempStringList.Delete(0); // Zeile' ----------------------------------------------------------------------------------------' löschen !  
  for i := 0 to tempStringList.Count -1 do form10.combobox3.Items.Add(copy(tempStringList[i],1,pos(' ',tempStringList[i])));
  tempStringList.Free;
  begin  
  tempStringList := TStringList.Create;  
  tempStringList.loadfromfile(ExtractFilePath(Application.ExeName)+'clubdateien\kader.txt'); //Datei laden
  tempStringList.Delete(0); // Zeile 'Name Age Nat St Tk Ps Sh Ag KAb TAb PAb SAb Gam Sav Ktk Kps Sht Gls Ass DP ' löschen !
  tempStringList.Delete(0); // Zeile' ----------------------------------------------------------------------------------------' löschen !  
  for i := 0 to tempStringList.Count -1 do form10.combobox4.Items.Add(copy(tempStringList[i],1,pos(' ',tempStringList[i])));
  tempStringList.Free;
  begin  
  tempStringList := TStringList.Create;
  tempStringList.loadfromfile(ExtractFilePath(Application.ExeName)+'clubdateien\kader.txt'); //Datei laden
  tempStringList.Delete(0); // Zeile 'Name Age Nat St Tk Ps Sh Ag KAb TAb PAb SAb Gam Sav Ktk Kps Sht Gls Ass DP ' löschen !
  tempStringList.Delete(0); // Zeile' ----------------------------------------------------------------------------------------' löschen !  
  for i := 0 to tempStringList.Count -1 do form10.combobox5.Items.Add(copy(tempStringList[i],1,pos(' ',tempStringList[i])));
  tempStringList.Free;
  begin  
  tempStringList := TStringList.Create;  
  tempStringList.loadfromfile(ExtractFilePath(Application.ExeName)+'clubdateien\kader.txt'); //Datei laden
  tempStringList.Delete(0); // Zeile 'Name Age Nat St Tk Ps Sh Ag KAb TAb PAb SAb Gam Sav Ktk Kps Sht Gls Ass DP ' löschen !
  tempStringList.Delete(0); // Zeile' ----------------------------------------------------------------------------------------' löschen !
  for i := 0 to tempStringList.Count -1 do form10.combobox6.Items.Add(copy(tempStringList[i],1,pos(' ',tempStringList[i])));
  tempStringList.Free;
  begin  
  tempStringList := TStringList.Create;  
  tempStringList.loadfromfile(ExtractFilePath(Application.ExeName)+'clubdateien\kader.txt'); //Datei laden
  tempStringList.Delete(0); // Zeile 'Name Age Nat St Tk Ps Sh Ag KAb TAb PAb SAb Gam Sav Ktk Kps Sht Gls Ass DP ' löschen !
  tempStringList.Delete(0); // Zeile' ----------------------------------------------------------------------------------------' löschen !  
  for i := 0 to tempStringList.Count -1 do form10.combobox7.Items.Add(copy(tempStringList[i],1,pos(' ',tempStringList[i])));
  tempStringList.Free;
  begin
  tempStringList := TStringList.Create;  
  tempStringList.loadfromfile(ExtractFilePath(Application.ExeName)+'clubdateien\kader.txt'); //Datei laden
  tempStringList.Delete(0); // Zeile 'Name Age Nat St Tk Ps Sh Ag KAb TAb PAb SAb Gam Sav Ktk Kps Sht Gls Ass DP ' löschen !
  tempStringList.Delete(0); // Zeile' ----------------------------------------------------------------------------------------' löschen !  
  for i := 0 to tempStringList.Count -1 do form10.combobox8.Items.Add(copy(tempStringList[i],1,pos(' ',tempStringList[i])));
  tempStringList.Free;
  begin  
  tempStringList := TStringList.Create;  
  tempStringList.loadfromfile(ExtractFilePath(Application.ExeName)+'clubdateien\kader.txt'); //Datei laden
  tempStringList.Delete(0); // Zeile 'Name Age Nat St Tk Ps Sh Ag KAb TAb PAb SAb Gam Sav Ktk Kps Sht Gls Ass DP ' löschen !
  tempStringList.Delete(0); // Zeile' ----------------------------------------------------------------------------------------' löschen !  
  for i := 0 to tempStringList.Count -1 do form10.combobox9.Items.Add(copy(tempStringList[i],1,pos(' ',tempStringList[i])));
  tempStringList.Free;
  begin  
  tempStringList := TStringList.Create;
  tempStringList.loadfromfile(ExtractFilePath(Application.ExeName)+'clubdateien\kader.txt'); //Datei laden
  tempStringList.Delete(0); // Zeile 'Name Age Nat St Tk Ps Sh Ag KAb TAb PAb SAb Gam Sav Ktk Kps Sht Gls Ass DP ' löschen !
  tempStringList.Delete(0); // Zeile' ----------------------------------------------------------------------------------------' löschen !  
  for i := 0 to tempStringList.Count -1 do form10.combobox10.Items.Add(copy(tempStringList[i],1,pos(' ',tempStringList[i])));
  tempStringList.Free;
  begin  
  tempStringList := TStringList.Create;  
  tempStringList.loadfromfile(ExtractFilePath(Application.ExeName)+'clubdateien\kader.txt'); //Datei laden
  tempStringList.Delete(0); // Zeile 'Name Age Nat St Tk Ps Sh Ag KAb TAb PAb SAb Gam Sav Ktk Kps Sht Gls Ass DP ' löschen !
  tempStringList.Delete(0); // Zeile' ----------------------------------------------------------------------------------------' löschen !
  for i := 0 to tempStringList.Count -1 do form10.combobox11.Items.Add(copy(tempStringList[i],1,pos(' ',tempStringList[i])));
  tempStringList.Free;
  begin  
  tempStringList := TStringList.Create;  
  tempStringList.loadfromfile(ExtractFilePath(Application.ExeName)+'clubdateien\kader.txt'); //Datei laden
  tempStringList.Delete(0); // Zeile 'Name Age Nat St Tk Ps Sh Ag KAb TAb PAb SAb Gam Sav Ktk Kps Sht Gls Ass DP ' löschen !
  tempStringList.Delete(0); // Zeile' ----------------------------------------------------------------------------------------' löschen !  
  for i := 0 to tempStringList.Count -1 do form10.combobox23.Items.Add(copy(tempStringList[i],1,pos(' ',tempStringList[i])));
  tempStringList.Free;
  begin
  tempStringList := TStringList.Create;  
  tempStringList.loadfromfile(ExtractFilePath(Application.ExeName)+'clubdateien\kader.txt'); //Datei laden
  tempStringList.Delete(0); // Zeile 'Name Age Nat St Tk Ps Sh Ag KAb TAb PAb SAb Gam Sav Ktk Kps Sht Gls Ass DP ' löschen !
  tempStringList.Delete(0); // Zeile' ----------------------------------------------------------------------------------------' löschen !
  for i := 0 to tempStringList.Count -1 do form10.combobox24.Items.Add(copy(tempStringList[i],1,pos(' ',tempStringList[i])));
  tempStringList.Free;
  begin  
  tempStringList := TStringList.Create;
  tempStringList.loadfromfile(ExtractFilePath(Application.ExeName)+'clubdateien\kader.txt'); //Datei laden
  tempStringList.Delete(0); // Zeile 'Name Age Nat St Tk Ps Sh Ag KAb TAb PAb SAb Gam Sav Ktk Kps Sht Gls Ass DP ' löschen !
  tempStringList.Delete(0); // Zeile' ----------------------------------------------------------------------------------------' löschen !  
  for i := 0 to tempStringList.Count -1 do form10.combobox25.Items.Add(copy(tempStringList[i],1,pos(' ',tempStringList[i])));
  tempStringList.Free;
  begin
  tempStringList := TStringList.Create;  
  tempStringList.loadfromfile(ExtractFilePath(Application.ExeName)+'clubdateien\kader.txt'); //Datei laden
  tempStringList.Delete(0); // Zeile 'Name Age Nat St Tk Ps Sh Ag KAb TAb PAb SAb Gam Sav Ktk Kps Sht Gls Ass DP ' löschen !
  tempStringList.Delete(0); // Zeile' ----------------------------------------------------------------------------------------' löschen !
  for i := 0 to tempStringList.Count -1 do form10.combobox26.Items.Add(copy(tempStringList[i],1,pos(' ',tempStringList[i])));
  tempStringList.Free;
  begin  
  tempStringList := TStringList.Create;
  tempStringList.loadfromfile(ExtractFilePath(Application.ExeName)+'clubdateien\kader.txt'); //Datei laden
  tempStringList.Delete(0); // Zeile 'Name Age Nat St Tk Ps Sh Ag KAb TAb PAb SAb Gam Sav Ktk Kps Sht Gls Ass DP ' löschen !
  tempStringList.Delete(0); // Zeile' ----------------------------------------------------------------------------------------' löschen !  
  for i := 0 to tempStringList.Count -1 do form10.combobox27.Items.Add(copy(tempStringList[i],1,pos(' ',tempStringList[i])));
  tempStringList.Free;
end;
end;
end;
end;
end;
end;
end;
end;
end;
end;
end;
end;
end;
end;
end;



Moderiert von user profile iconGausi: Topic aus Dateizugriff verschoben am Mo 07.03.2005 um 19:32
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8554
Erhaltene Danke: 481

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Mo 07.03.05 19:28 
Da würde wohl Suche in: Delphi-Forum, Delphi-Library FINDCOMPONENT helfen.

_________________
We are, we were and will not be.
Sprint
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 849



BeitragVerfasst: Mo 07.03.05 20:34 
ausblenden volle Höhe Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
var
  NewItems: TStringList;
  I: Integer;
begin

  NewItems := TStringList.Create;

  try

    with TStringList.Create do
      try
        LoadFromFile(ExtractFilePath(ParamStr(0)) + 'ClubDateien\Kader.txt');
        for I := 2 to Count - 1 do
          NewItems.Add(Copy(Strings[I], 1, Pos(#32, Strings[I])));
      finally
        Free;
      end;

      with Form10 do
      begin
        ComboBox1.Items.AddStrings(NewItems);
        ComboBox2.Items.AddStrings(NewItems);
        ComboBox3.Items.AddStrings(NewItems);
        // ...
        ComboBox27.Items.AddStrings(NewItems);
      end;

  finally
    NewItems.Free;
  end;

end;

_________________
Ciao, Sprint.