Alinhamento Justificado com o RQDBRICHTEXT
18/12/2003
0
Preciso justificar o RQDBRICHTEXT alguém sabe, ou outro componente??
Obrigado,
Meu Email: gleidison@unsoft.com.br
Obrigado,
Meu Email: gleidison@unsoft.com.br
Gleidisonsandro
Curtir tópico
+ 0
Responder
Posts
18/12/2003
Fabio.hc
Tenho esta função que justifica texto, talvez te ajude.
Exemplo:
function Justifica(mCad:string;mMAx:integer):string; var mPos,mPont,mTam,mNr,mCont:integer; mStr:string; begin mTam:=Length(mCad); if mTam>=mMax then Result:=copy(mCad,1,mMax) else mStr:=´´; mCont:=0; mPont:=1; mNr:=mMax-mTam; while mCont<mNr do begin mPos:=pos(mStr,copy(mCad,mPont,100)); if mPos=0 then begin mStr:=mStr+´ ´; mPont:=1; continue; end else begin mCont:=mCont+1; Insert(´ ´,mCad,mPos+mPont); mPont:=mPont+mPos+length(mStr); end; Result:=mCad; end; end;
Exemplo:
procedure TForm1.Button1Click(Sender: TObject); var i:integer; begin for i:=1 to Memo1.Lines.Count do if Memo1.Lines[i] <> ´´ then Memo1.Lines[i]:=Justifica(Memo1.Lines[i],60); end;
Responder
Clique aqui para fazer login e interagir na Comunidade :)