Hola ingabraham.
Cita:
Empezado por ingabraham
...
quiero ordenarla descendentemente , he probado con el metodo sort
|
¿ Y no te ha funcionado ?, intenta de este modo:
Código Delphi
[-]
...
function CompareDesc(TS: TStrings; const i1, i2: Integer): Integer;
begin
Result:= CompareText(TS[i2], TS[i1]);
end;
procedure TForm1.Button1Click(Sender: TObject);
var
TS: TStringList;
begin
TS:= TStringList.Create;
try
TS.Add('2003');
TS.Add('2004');
TS.Add('2005');
TS.CustomSort(@CompareDesc);
finally
TS.Free;
end;
end;
Saludos