Rpreview Margin
Posted: Wed May 14, 2008 9:36 am
How I can show a Dotted Lines into Rpreview Class to show the Margins of the paper ?
I made a method but it not run ok
I add this data
DATA nMargTop,nMargLeft,nMargBottom,nMargRight AS NUMERIC INIT 0
DATA lMargin, hSolidPen
and on the New method
::hSolidPen := CreatePen (PS_DOT, 1, CLR_GRAY)
::nMargTop := 15
::nMargLeft := 15
::nMargBottom := 15
::nMargRight := 15
::lMargin = .T.
and I add a new method
and I add ::Smargin() on the PaintMeta method
Some can help me please ?
I made a method but it not run ok
I add this data
DATA nMargTop,nMargLeft,nMargBottom,nMargRight AS NUMERIC INIT 0
DATA lMargin, hSolidPen
and on the New method
::hSolidPen := CreatePen (PS_DOT, 1, CLR_GRAY)
::nMargTop := 15
::nMargLeft := 15
::nMargBottom := 15
::nMargRight := 15
::lMargin = .T.
and I add a new method
Code: Select all
METHOD SMargin() CLASS Tpaper
if !::lMargin
return nil
endif
::oWnd:GetDC()
MoveTo( ::oWnd:hDC ,;
::nMargTop ,;
::nMargLeft )
LineTo( ::oWnd:hDC ,;
::nMargTop ,;
::nMargLeft ,;
::hSolidPen:hPen )
MoveTo( ::oWnd:hDC ,;
::nMargTop ,;
::nMargRight )
LineTo( ::oWnd:hDC ,;
::nMargRight ,;
::nMargBottom ,;
::hSolidPen:hPen )
::oWnd:ReleaseDC()
return nil
Some can help me please ?