Ver Mensaje Individual
  #10  
Antiguo 31-12-2017
josesuarezochoa josesuarezochoa is offline
Registrado
NULL
 
Registrado: nov 2016
Posts: 6
Reputación: 0
josesuarezochoa Va por buen camino
Solucionado

al final lo que hice fue crear una función y en el evento onpaint del label pues llamarla:

Código Delphi [-]
LabelDescripcionDetalles.Text:=AdaptarTexto(LabelDescripcionDetalles.Text,cantidadcaracteres);
Código Delphi [-]
function TForm1.AdaptarTexto(texto:string;largo:integer): String;
begin
  if (Length(texto)>largo) and (largo > 5) then
  begin
    result:=Copy(texto,1,largo);
    Result:=result+'...';
  end
  else
    result:=texto;
end;

Por si a alguien le sirve de ayuda.

Última edición por ecfisa fecha: 31-12-2017 a las 01:53:40. Razón: Agregar etiquetas [delphi] [/delphi]
Responder Con Cita