Poner color de fondo oPrn:Box()

Poner color de fondo oPrn:Box()

Postby noe aburto » Thu Apr 25, 2019 9:04 pm

Saludos.

Tengo la necesidad de poner cuadros con texto y titulos usando el metodo Box() de tprinter, pero que los titulos tomen un color de fondo determinado

oPrn:Box(...)

La otra es como crear cuadros con las esquinas redondeadas con la misma clase?

Ayuda porfa.
Noé Aburto Sánchez
Tec. Prog. de Sistemas. -Morelia, Mich. México.
fwh 20.06, Harbour 3.2.0, bcc 7.4
TsBrowse 9.0, TsButton 7.0, xEdit 6.1
naburtos@gmail.com, noeaburto67@hotmail.com
User avatar
noe aburto
 
Posts: 418
Joined: Wed Nov 26, 2008 6:33 pm
Location: Morelia, Mich. Mexico.

Re: Poner color de fondo oPrn:Box()

Postby karinha » Fri Apr 26, 2019 1:13 pm

Algo Asi?

Code: Select all  Expand view

#include "fivewin.ch"

#define PAD_LEFT            0
#define PAD_RIGHT           1
#define PAD_CENTER          2

FUNCTION Main()

   LOCAL oPrn, oFont, oPen, oPen1, oPen2, oPen3
   LOCAL nLinI, nColI, nLinF, nColF

   nLinI :=  0.90

   nColI :=  0.90

   nLinF := 28.60

   nColF := 20.00

   SetDefaultPrinter( PrnGetName() )

   PRINT oPrn NAME "Impresión en Vertical.." PREVIEW MODAL

      DEFINE FONT oFont NAME "Arial" SIZE 0, - 12 BOLD OF oPrn

      DEFINE PEN oPen  WIDTH 2                         OF oPrn
      DEFINE PEN oPen1 WIDTH 4 COLOR CLR_BROWN         OF oPrn
      DEFINE PEN oPen2 WIDTH 2 COLOR CLR_BROWN         OF oPrn
      DEFINE PEN oPen3 WIDTH 5 COLOR CLR_HRED          OF oPrn

      oPrn:SetPage( 9 )  // A4

      oPrn:SetPortrait() // Vertical

      PAGE

         oPrn:Cmtr2Pix( @nLinI, @nColI )

         oPrn:cmtr2Pix( @nLinF, @nColF )

         oPrn:Box( nLinI, nColI, nLinF, nColF, oPen3 )

         oPrn:cmSay( 1.0,  1.0,  "Superior Izquierda", oFont, , CLR_BLACK, , PAD_LEFT  )

         oPrn:cmSay( 1.0, 10.5,  "Superior Centro",    oFont, , CLR_BLACK, , PAD_CENTER )

         oPrn:cmSay( 1.0, 20.0,  "Superior Derecha",   oFont, , CLR_BLACK, , PAD_RIGHT )

         oPrn:cmSay( 28.0,  1.0, "Inferior Izquierda", oFont, , CLR_BLACK, , PAD_LEFT  )

         oPrn:cmSay( 28.0, 10.5, "Inferior Centro",    oFont, , CLR_BLACK, , PAD_CENTER )

         oPrn:cmSay( 28.0, 20.0, "Inferior Derecha",   oFont, , CLR_BLACK, , PAD_RIGHT )

      ENDPAGE

   ENDPRINT

RETURN NIL
 


Saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7607
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 55 guests