Noch ein Hallöle von
http://www.FrankNStein.de/Smiley-Wolke.gif,
hatte mit ValueListEditor noch nicht so viel zu tun.
Also jetzt noch mal überarbeitet.
Hab sogar noch eine Verbesserung gefunden:
Delphi-Quellcode:
ValueListEditor1.Strings.Values[ValueListEditor1.Strings.Names[I]]
{=}
ValueListEditor1.Strings.ValueFromIndex[I]
Nach Schlüsseln in aufsteigender Reihfolge (A => Z):
Delphi-Quellcode:
Var I, I2: Integer;
S: String;
For I := 0 to ValueListEditor1.Strings.Count - 2 do
For I2 := I + 1 to ValueListEditor1.Strings.Count - 1 do
If (ValueListEditor1.Strings.Names[I] > ValueListEditor1.Strings.Names[I2]) or
((ValueListEditor1.Strings.Names[I] = ValueListEditor1.Strings.Names[I2]) and
(ValueListEditor1.Strings.ValueFromIndex[I] > ValueListEditor1.Strings.ValueFromIndex[I2])) Then Begin
S := ValueListEditor1.Strings[I];
ValueListEditor1.Strings[I] := ValueListEditor1.Strings[I2];
ValueListEditor1.Strings[I2] := S;
End;
Nach Werten in aufsteigender Reihfolge (A => Z):
Delphi-Quellcode:
Var I, I2: Integer;
S: String;
For I := 0 to ValueListEditor1.Strings.Count - 2 do
For I2 := I + 1 to ValueListEditor1.Strings.Count - 1 do
If (ValueListEditor1.Strings.ValueFromIndex[I] > ValueListEditor1.Strings.ValueFromIndex[I2]) or
((ValueListEditor1.Strings.ValueFromIndex[I] = ValueListEditor1.Strings.ValueFromIndex[I2]) and
(ValueListEditor1.Strings.Names[I] > ValueListEditor1.Strings.Names[I2])) Then Begin
S := ValueListEditor1.Strings[I];
ValueListEditor1.Strings[I] := ValueListEditor1.Strings[I2];
ValueListEditor1.Strings[I2] := S;
End;
Nach Schlüsseln in fallender Reihnfolge (Z => A):
Delphi-Quellcode:
Var I, I2: Integer;
S: String;
For I := 0 to ValueListEditor1.Strings.Count - 2 do
For I2 := I + 1 to ValueListEditor1.Strings.Count - 1 do
If (ValueListEditor1.Strings.Names[I] < ValueListEditor1.Strings.Names[I2]) or
((ValueListEditor1.Strings.Names[I] = ValueListEditor1.Strings.Names[I2]) and
(ValueListEditor1.Strings.ValueFromIndex[I] < ValueListEditor1.Strings.ValueFromIndex[I2])) Then Begin
S := ValueListEditor1.Strings[I];
ValueListEditor1.Strings[I] := ValueListEditor1.Strings[I2];
ValueListEditor1.Strings[I2] := S;
End;
Nach Werten in fallender Reihfolge (Z => A):
Delphi-Quellcode:
Var I, I2: Integer;
S: String;
For I := 0 to ValueListEditor1.Strings.Count - 2 do
For I2 := I + 1 to ValueListEditor1.Strings.Count - 1 do
If (ValueListEditor1.Strings.ValueFromIndex[I] < ValueListEditor1.Strings.ValueFromIndex[I2]) or
((ValueListEditor1.Strings.ValueFromIndex[I] = ValueListEditor1.Strings.ValueFromIndex[I2]) and
(ValueListEditor1.Strings.Names[I] < ValueListEditor1.Strings.Names[I2])) Then Begin
S := ValueListEditor1.Strings[I];
ValueListEditor1.Strings[I] := ValueListEditor1.Strings[I2];
ValueListEditor1.Strings[I2] := S;
End;
http://www.FrankNStein.de/Smiley-Kuss.gif http://www.FrankNStein.de/Smiley-Spinne.gif http://www.FrankNStein.de/Smiley-Winken.gif