Hola a todos, les agradeceria si me pueden ayudar necesito imprimir varios campos memos pero el problema es que deben justificarse tanto a la izquierda como a la derecha.
asi lo estoy haciendo pero sin justificar
cVar := strtran( Formulas->Detalle, ";", ' ')
if len( cVar ) > 0
nLinx := MLCOUNT( cVar, 130 )
for nLin := 1 to nLinx
cImpr := MEMOLINE( cVar, 130, nLin )
nLinea += 3
@ nLinea, 12 PRINT cImpr FONT "Arial" SIZE 7
next
nLinea += 8
endif
Como Justificar completo impresion campo memo
Moderator: Rathinagiri
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
Como Justificar completo impresion campo memo
Hola Gabriel,
Para conseguir un resultado más rápido y menos dificil. Debes utilizar fuentes monospace, es decir fuentes que tengan el mismo tamaño en cada caracter.
Si te fijas en el código del STRU, en la funcion MyAlert verás otros llamados que arreglan el texto: FixText y Split. Fijate si te sirve, pero tienen que ser en "Courier New", ok ?
Para conseguir un resultado más rápido y menos dificil. Debes utilizar fuentes monospace, es decir fuentes que tengan el mismo tamaño en cada caracter.
Si te fijas en el código del STRU, en la funcion MyAlert verás otros llamados que arreglan el texto: FixText y Split. Fijate si te sirve, pero tienen que ser en "Courier New", ok ?
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
- Jairo Maia
- Posts: 53
- Joined: Sun Jul 17, 2011 1:47 pm
- Location: Campinas - SP - Brazil
Re: Como Justificar completo impresion campo memo
(Bing translator)
Hola Gabriel,
Ver si eso también te da una idea:
Hola Gabriel,
Ver si eso también te da una idea:
Code: Select all
cVar := StrTran( Formulas->Detalle, ";", ' ')
If Len( cVar ) > 0
nLinx := MlCount( cVar, 130 )
For nLin := 1 to nLinx
cImpr := MemoLine( cVar, 130, nLin )
cImpr := JustMemo( cImpr )
nLinea += 3
@ nLinea, 12 PRINT cImpr FONT "Arial" SIZE 7
Next
nLinea += 8
EndIf
Function JustMemo( cLine )
Local cSpace := Space( 1 )
Local nLenLine := Len( cLine )
If Right( Trim( cLine ), 1 ) != "." .And. At( " ", Trim( cLine ) ) > 0
cLine := Trim( cLine )
While ( nLenLine - Len( cLine ) > 0 )
nRepeat := ( nLenLine - Len( cLine ) )
If ( nRepeat > 0 )
cLine := StrTran( cLine, cSpace, cSpace + cSpace, 1, nRepeat )
EndIf
EndDo
EndIf
Return cLine
Como Justificar completo impresion campo memo
Gracias Jairo era lo que estaba necesitando, le agradezco su colaboracion eres un mago.