COMO JUSTIFICAR UM RICHEDIT NO DELPHI?

Delphi

23/03/2003

COMO JUSTIFICAR UM RICHEDIT NO DELPHI?


Anonymous

Anonymous

Curtidas 0

Respostas

Carnette

Carnette

23/03/2003

COMO JUSTIFICAR UM RICHEDIT NO DELPHI?


http://clubedelphi.videomart.com.br/viewtopic.php?t=6598


GOSTEI 0
Dor_poa

Dor_poa

23/03/2003

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;
EX.:
Memo1.lines[i]:=(justifica(memo1.lines[i],60 {Nº de caracteres possiveis da linha});


GOSTEI 0
POSTAR