Justificar Paragrafo no RichEdit??
:?: Pelo Amor de Deus!!!
Alguem tem alguma função para fazer uma Justificação
de paragrafo em um RichEdit??? por favor!!!!!!!
Até hoje nunca encotrei alguma função que faça uma justificação.
No Site da activedelphi.hpg.com.br
tem um componente. mas testei e não serviu!
http://www.activedelphi.hpg.com.br/componentes/JustifyRichEdit.zip
Please!!!!
Alguem tem alguma função para fazer uma Justificação
de paragrafo em um RichEdit??? por favor!!!!!!!
Até hoje nunca encotrei alguma função que faça uma justificação.
No Site da activedelphi.hpg.com.br
tem um componente. mas testei e não serviu!
http://www.activedelphi.hpg.com.br/componentes/JustifyRichEdit.zip
Please!!!!
Chaplinux
Curtidas 0
Respostas
Oberdan
25/06/2003
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;
EX.:
Memo1.lines[i]:=justifica(memo1.lines[i],60 {Nº de caracteres possiveis da linha});
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
Weber
25/06/2003
Acesse http://www.produsys.kit.net e baixe um editor de textos feito em delphi.
Vê se é isso que voce quer, se for é só entrar em contato.
Vê se é isso que voce quer, se for é só entrar em contato.
GOSTEI 0
Weber
25/06/2003
Acesse http://www.produsys.kit.net e baixe um editor de textos feito em delphi.
Vê se é isso que voce quer, se for é só entrar em contato.
Vê se é isso que voce quer, se for é só entrar em contato.
GOSTEI 0
Weber
25/06/2003
Acesse http://www.produsys.kit.net e baixe um editor de textos feito em delphi.
Vê se é isso que voce quer, se for é só entrar em contato.
Vê se é isso que voce quer, se for é só entrar em contato.
GOSTEI 0