Ver Mensaje Individual
  #2  
Antiguo 19-03-2013
darkamerico darkamerico is offline
Miembro
 
Registrado: dic 2010
Posts: 273
Reputación: 16
darkamerico Va por buen camino
Wink Solucion

Encontre esta funcion que realiza el trabajo.

Código Delphi [-]
procedure JustifyRichText(RichEdit :TRxRichEdit; AllText :Boolean);
const
  TO_ADVANCEDTYPOGRAPHY = $1;
  EM_SETTYPOGRAPHYOPTIONS = (WM_USER + 202);
  EM_GETTYPOGRAPHYOPTIONS = (WM_USER + 203);
var
  ParaFormat :TParaFormat;
  SelStart,SelLength :Integer;
begin
  ParaFormat.cbSize := SizeOf(ParaFormat);
  if SendMessage(RichEdit.handle,EM_SETTYPOGRAPHYOPTIONS,TO_ADVANCEDTYPOGRAPHY,TO_ADVANCEDTYPOGRAPHY) = 1 then
  begin
    SelStart := RichEdit.SelStart;
    SelLength := RichEdit.SelLength;
    if AllText then
      RichEdit.SelectAll;
      ParaFormat.dwMask := PFM_ALIGNMENT;
      ParaFormat.wAlignment := PFA_JUSTIFY;
      SendMessage(RichEdit.handle, EM_SETPARAFORMAT, 0, LongInt(@ParaFormat));
      RichEdit.SelStart := SelStart;
      RichEdit.SelLength := SelLength;
  end;
end;

Espero que sea de utilidad para ustedes.

Atte
Americo
Responder Con Cita