Jump to content
Fivewin Brasil

Justificar Texto


betovsp

Recommended Posts

Boa Noite pessoal, tenho uma função de justificar texto que funcionava em clipper, mas não esta funcionando legal, preciso imprimir um campo memo justificado, de preferencia igual ao Word, alguém pode me dar um help?

Abraços.

Beto

betovsp@hotmail.com

(16)9148-1515

CL53B + FW2.0 + @ SAY + BLINKER 7

Ribeirão Preto/SP

III ENCONTRO DE FIVEWINERS -> ESSE EU NÃO PERCO

Link to comment
Share on other sites

Boa Noite pessoal, tenho uma função de justificar texto que funcionava em clipper, mas não esta funcionando legal, preciso imprimir um campo memo justificado, de preferencia igual ao Word, alguém pode me dar um help?

Abraços.

Beto

betovsp@hotmail.com

(16)9148-1515

CL53B + FW2.0 + @ SAY + BLINKER 7

Ribeirão Preto/SP

III ENCONTRO DE FIVEWINERS -> ESSE EU NÃO PERCO

Link to comment
Share on other sites

Boa Noite pessoal, tenho uma função de justificar texto que funcionava em clipper, mas não esta funcionando legal, preciso imprimir um campo memo justificado, de preferencia igual ao Word, alguém pode me dar um help?

Abraços.

Beto

betovsp@hotmail.com

(16)9148-1515

CL53B + FW2.0 + @ SAY + BLINKER 7

Ribeirão Preto/SP

III ENCONTRO DE FIVEWINERS -> ESSE EU NÃO PERCO

Link to comment
Share on other sites

Boa Noite Pessoal, abaixo esta minha função de justificar texto, esta funcionando corretamente, imprimindo um campo memo, com fonte Courier New (Dica do elitenet, pois o espaçamento é igual a do DOS), peço ajuda dos amigos simplesmente pra colocar parágrafo, que não estou conseguindo:

vtxt:=JustTexto(Cam->texto,70)

FOR j:=1 TO LEN(vtxt)

oRepEtiqn:SAY(xlin*nlinha,xcol*1.5,vtxt[j],oFnt5) ; nlinha=nlinha+.50

NEXT

FUNCTION JustTexto(cTextJust,nTamCol)

LOCAL aTextResult:={},cTextEdit:=""

cTextEdit:=ALLTRIM(cTextJust)

nTotLinhas:=MLCOUNT(cTextEdit,nTamCol)

FOR t:=1 TO nTotLinhas

AADD(aTextResult,MEMOLINE(cTextEdit,nTamCol,t))

nCodAsc:=170

aTextResult[t]:=ALLTRIM(aTextResult[t])

aTextResult[t]:=STRTRAN(aTextResult[t]," ",CHR(nCodAsc))

while .T.

IF LEN(ALLTRIM(aTextResult[t]))==nTamCol .OR. t==nTotLinhas

FOR r:=170 TO nCodAsc

aTextResult[t]:=STRTRAN(aTextResult[t],CHR®," ")

NEXT r

EXIT

END

nPosSpaco:=AT(CHR(nCodAsc),aTextResult[t])

IF nPosSpaco > 0

aTextResult[t]:=SUBSTR(aTextResult[t],1,nPosSpaco-1)+SPACE(2)+;

SUBS(aTextResult[t],nPosSpaco+1,(nTamCol-(nPosSpaco-1)))

aTextResult[t]:=ALLTRIM(aTextResult[t])

aTextResult[t]:=STRTRAN(aTextResult[t],CHR(nCodAsc),CHR(nCodAsc+1))

ELSE

/* nPosSpaco:=AT(SPACE(2),aTextResult[t])

aTextResult[t]:=SUBS(aTextResult[t],1,nPosSpaco-1)+SPACE(3)+;

SUBS(aTextResult[t],nPosSpaco+2,(nTamCol-(nPosSpaco-2)))*/

EXIT

END

nCodAsc+=1

END

NEXT

RETURN(aTextResult)

Desde já Agradeço.

Abraços.

Beto

betovsp@hotmail.com

(16)9148-1515

CL53B + FW2.0 + @ SAY + BLINKER 7

Ribeirão Preto/SP

III ENCONTRO DE FIVEWINERS -> ESSE EU NÃO PERCO

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...