FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour Centrar un texto con TPrinter
Posts: 485
Joined: Fri Feb 09, 2007 10:34 AM
Centrar un texto con TPrinter
Posted: Thu May 03, 2007 03:20 PM

Muy buenas, estoy interesado en centrar un texto con TPRINTER,sabiendo el texto a centrar, el font del texto y si la impresion es vertical o horizontal.

Gracias.
Un Saludo.

Posts: 731
Joined: Fri Oct 07, 2005 07:42 AM
Re: Centrar un texto con TPrinter
Posted: Thu May 03, 2007 04:54 PM
softruz wrote:Muy buenas, estoy interesado en centrar un texto con TPRINTER,sabiendo el texto a centrar, el font del texto y si la impresion es vertical o horizontal.

Gracias.
Un Saludo.


Bajate las clase TImprime y TUtilPrn, estan por aqui en el foro de utilidades,
y ahi tienes el codigo fuente que realiza eso y mucho mas...
Saludos

Rafa Carmona ( rafa.thefullARROBAgmail.com___quitalineas__)
Posts: 1144
Joined: Mon Feb 05, 2007 07:15 PM
Centrar un texto con TPrinter
Posted: Thu May 03, 2007 10:21 PM

PRINT oPrn NAME "Reporte de nomina semanal ..." PREVIEW
DEFINE FONT oFnt1 NAME "Arial" SIZE 0, -08 OF oPrn bold

PAGE
oPrn:CmSay(1, 01, 'TEXTO NORMAL', oFnt1 )

_centraCm(1, 'TEXTO CENTRADO', oPrn, oFnt1 )

ENDPAGE
ENDPRINT

FUNCTION _centraCm(nRen,cValor, oPrn, oFont )
oPrn:CmSay(nRen,0,cValor,oFont,oPrn:nHorzRes,,,2 )
RETURN (nil)

saludos.

Cesar Cortes Cruz

SysCtrl Software

Mexico



' Sin +- FWH es mejor "

Continue the discussion