Ver Mensaje Individual
  #2  
Antiguo 23-05-2006
Avatar de Neftali [Germán.Estévez]
Neftali [Germán.Estévez] Neftali [Germán.Estévez] is offline
[becario]
 
Registrado: jul 2004
Ubicación: Barcelona - Espańa
Posts: 18.275
Reputación: 10
Neftali [Germán.Estévez] Es un diamante en brutoNeftali [Germán.Estévez] Es un diamante en brutoNeftali [Germán.Estévez] Es un diamante en bruto
Crea un StringList ordenado. Pasa los datos de Memo.Lines al StringList con:
Código Delphi [-]
  
  ST.AddStrings(Memo1.Lines);

Y vuelve a volcar esto sobre el memo. El StringList te las habrá ordenado correctamente.


Completo sería algo así:

Código Delphi [-]
  
  // Crear
  ST := TStringList.Create();
  ST.Sorted := True;
  // Asignar
  ST.AddStrings(Memo1.Lines);
  // Retornarlas al Memo
  Memo1.Lines.Clear;
  Memo1.Lines.AddStrings(ST.Strings);
  // Liberar
  ST.Free;
__________________
Germán Estévez => Web/Blog
Guía de estilo, Guía alternativa
Utiliza TAG's en tus mensajes.
Contactar con el Clubdelphi

P.D: Más tiempo dedicado a la pregunta=Mejores respuestas.
Responder Con Cita