TPrinter:Box() method

TPrinter:Box() method

Postby Enrico Maria Giordano » Fri Feb 17, 2006 10:30 am

Is it expected that the box is solid? As you can see in the following sample, the string is not visible through the box:

Code: Select all  Expand view
#include "Fivewin.ch"


FUNCTION MAIN()

    LOCAL oPrn

    PRINT oPrn PREVIEW
        PAGE
            oPrn:Say( 100, 100, "This is a test" )
            oPrn:Box( 0, 0, 1000, 1000 )
        ENDPAGE
    ENDPRINT

    RETURN NIL


Eventually this is a new Box() method that draws transparent box:

Code: Select all  Expand view
METHOD Box( nRow, nCol, nBottom, nRight, oPen ) CLASS TPrinter

   local hOldBrush := SelectObject( ::hDCOut, GetStockObject( BRUSH_NULL ) )

   Rectangle( ::hDCOut, nRow, nCol, nBottom, nRight, iif( oPen != NIL, oPen:hPen, 0 ) )

   SelectObject( ::hDCOut, hOldBrush )

return nil


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8410
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 152 guests