Fórum Justificar Texto ??? #176606
21/08/2003
0
justificar texto nos relatórios QReport ou
em algum outro tipo de gerador de relatórios.
Já estou desesperado, preciso justificar
textos, da mesma forma que o MS-Word
justifica texto, não não encontro nada na
Internet.
SERÁ QUE ALGUEM PODE ME AJUDAR ??? :(
Eniorm
Curtir tópico
+ 0Posts
21/08/2003
Carnette
http://www.carnette.kit.net/D5/eccjusti.zip
Gostei + 0
21/08/2003
Joilson_gouveia
303 - Justificar Texto
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});
Gostei + 0
21/08/2003
Eniorm
Legal, mas essa dica vc tirou do DTDelphi , não é mesmo???
Eu já testei mas não obtive resultados satisfatórios, vc já
testou ???
Mas de qualquer forma, obrigado pela ajuda..., e se souber
mais alguma coisa me ajude, pq assim vc, com certeza vai
estar ajudando a muitos outros!!!
T+
Gostei + 0
22/08/2003
Eniorm
Ae cara, esse componente q vc passou funciona Ok!
Obrigado mesmo, cara. Vc naum sabe a árvore
q vc quebrou !!!
[b:906d423b8e]GALERA, BAIXEM ESSE COMPONENTE PARA JUSTIFICAR
TEXTOS NO RELATÓRIO, FUNCIONA MESMO !!!!!!!!!!!!!![/b:906d423b8e]
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)