Friend,
i wish create a method to print a week calendar with tcalex class
I made this method .. but i run bad
CLASS TWeekView FROM TCalex
METHOD PrintWeek()
It create the grid on a page setlandscape but it is too big
then I not Know How insert the record from citas dbf
thanks to all help me
i wish create a method to print a week calendar with tcalex class
I made this method .. but i run bad
CLASS TWeekView FROM TCalex
METHOD PrintWeek()
METHOD PrintWeek() CLASS TWeekView
local oPrn, oFont
local nRowStep, nColStep
local nRow := 0, nCol := 0, n, m
local nGridHeight
local nGridWidth
local aDataArea := Array( 4 )
DEFINE PEN oPen WIDTH 2
PRINT oPrn NAME "Print week" PREVIEW
if Empty( oPrn:hDC )
return nil // Printer was not installed or ready
endif
oPrn:SetLandScape()
nRowStep:=20
ncolStep:=15
nHeightHeader := 120
nGridHeight := oPrn:nHorzRes() / nRowStep
nGridWidth := oPrn:nVertRes() / nRowStep
PAGE
aDataArea[ 1 ] := ::nTopMargin - ::nVirtualTop
aDataArea[ 2 ] := ::nLeftMargin + ::nLeftLabelWidth
aDataArea[ 3 ] := (nGridHeight*nRowStep) + ::nTopMargin - ::nVirtualTop / oPrn:nLogPixelX()
aDataArea[ 4 ] := (nGridWidth*ncolStep) + ( ::nLeftMargin + ::nLeftLabelWidth ) / oPrn:nLogPixelY()
oPrn:Box(aDataArea[ 1 ], aDataArea[ 2 ], aDataArea[ 3], aDataArea[ 4 ], oPen )
::PaintHorzLinesWithLeftLabels( oPrn )
nCol2Step = ( Int( nGridWidth / ::nDays )) * ncolStep
for n = 1 to 6
oPrn:Line( ::nTopMargin - ::nDNameHeight,;
::nLeftMargin + ::nLeftLabelWidth + ( n * nCol2Step ),;
(nGridHeight*nRowStep) + ::nTopMargin,;
::nLeftMargin + ::nLeftLabelWidth + ( n * nCol2Step ) )
next
oPrn:Box( ::nTopMargin - ::nDNameHeight,;
aDataArea[ 2 ], ;
::nTopMargin+nHeightHeader, ;
aDataArea[ 4 ], ;
open)
for n = 1 to 6
oPrn:Line(::nTopMargin - ::nDNameHeight,;
::nLeftMargin + ::nLeftLabelWidth + ( n * nCol2Step ),;
::nTopMargin+nHeightHeader,;
::nLeftMargin + ::nLeftLabelWidth + ( n * nCol2Step ) )
next
// ::PaintHeader( oPrn )
ENDPAGE
ENDPRINT
RETURN nilIt create the grid on a page setlandscape but it is too big
then I not Know How insert the record from citas dbf
thanks to all help me
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com


