Fórum Texto em duas linhas em Qrlabel #391094
23/11/2010
0
Joaci Queiroz
Curtir tópico
+ 0Posts
24/11/2010
Leonardo Xavier
Gostei + 0
24/11/2010
Joaci Queiroz
Gostei + 0
24/11/2010
Leonardo Xavier
Tente o seguinte:
Justificar texto Declare a Unit RichEdit no USES. Use a procedure assim: Justificar(QrMemo1); procedure Justificar(Const QRMEMO: TQRMemo); const WM_USER = $400; EM_EXSETSEL = (WM_USER + 55); EM_SETTYPOGRAPHYOPTIONS = (WM_USER + 202); EM_GETTYPOGRAPHYOPTIONS = (WM_USER + 203); TO_ADVANCEDTYPOGRAPHY = $1; mZERO = $0; var x :tparaformat; L :LongInt; cp :charrange; begin x.cbSize := sizeof(x); if SelLength = 0 then begin cp.cpMin := 0; cp.cpMax := length(QRMEMO.Lines.Text); SendMessage(QRMEMO.Handle,EM_EXSETSEL,mZERO,LPARAM(@cp)); end; L := SendMessageA(H,EM_SETTYPOGRAPHYOPTIONS, TO_ADVANCEDTYPOGRAPHY, TO_ADVANCEDTYPOGRAPHY); if L = 1 then begin SendMessageA(QRMEMO.Handle, EM_GETTYPOGRAPHYOPTIONS, mZERO, mZERO); SendMessage(QRMEMO.Handle, EM_GETPARAFORMAT, mZERO, LPARAM(@x)); x.dwMask := PFM_ALIGNMENT; x.wAlignment := PFA_JUSTIFY; SendMessage(QRMEMO.Handle, EM_SETPARAFORMAT, mZERO, lparam(@x)); end; cp.cpMin := 0; cp.cpMax := 0; SendMessage(QRMEMO.Handle,EM_EXSETSEL,mZERO,lparam(@cp)); WordWrap := true; end;
qualquer duvida posta ai. Abraços
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)