by Otto » Thu Mar 02, 2006 8:04 am
Thank you for your answer.
Here are more infos.
Tanti saluti
Otto
// Class. Mainly used for Automatic Alignment techniques
#include "FiveWin.ch"
#ifdef __XPP__
#define Super ::TControl
#define New _New
#endif
//----------------------------------------------------------------------------//
CLASS TInvoice FROM TControl
CLASSDATA lRegistered AS LOGICAL
METHOD New( nTop, nLeft, nBottom, nRight, oWnd ) CONSTRUCTOR
METHOD IVHeader()
METHOD IVBody()
METHOD IVFooter()
METHOD IVClear()
METHOD IVSay()
METHOD IVBox()
METHOD IVLine()
ENDCLASS
//----------------------------------------------------------------------------//
METHOD New( nTop, nLeft, nBottom, nRight, oWnd ) CLASS TInvoice
DEFAULT nTop := 0, nLeft := 0, nBottom := 100, nRight := 100,;
oWnd := GetWndDefault()
::nTop = nTop
::nLeft = nLeft
::nBottom = nBottom
::nRight = nRight
::oWnd = oWnd
//::nStyle = nOr( WS_CHILD, WS_VISIBLE )
::nStyle = nOr( WS_CHILD, WS_VISIBLE, WS_TABSTOP )
::lDrag = .f.
::Register()
if ! Empty( ::oWnd:hWnd )
::Create()
::oWnd:AddControl( Self )
else
::oWnd:DefControl( Self )
endif
return Self
//----------------------------------------------------------------------------//
METHOD IVHeader(nRowHeader,Font1,Font2,Font3) CLASS TInvoice
::say(nRowHeader , 20, "ArtNr" ,255,16777215,Font3,.T.)
::say(nRowHeader , 100, "Bezeichnung" ,255,16777215,Font1,.T.)
::say(nRowHeader , 500, "Preis" ,255,16777215,Font2,.T.)
nRowHeader += Font2:nHeight
::say( nRowHeader, 500, "inkl. MWST" ,255,16777215,Font3,.T.)
nRowHeader += Font2:nHeight
return nil
//----------------------------------------------------------------------------//
METHOD IVBody() CLASS TInvoice
return nil
//----------------------------------------------------------------------------//
METHOD IVFooter(nRowFooter,Font1,Font2,Font3) CLASS TInvoice
nRowFooter += Font2:nHeight/2
::line (nRowFooter,11,nRowFooter,700 )
nRowFooter += Font2:nHeight/2
::say(nRowFooter , 20, "ArtNr" ,255,16777215,Font3,.T.)
::say(nRowFooter , 100, "Summe" ,255,16777215,Font1,.T.)
::say(nRowFooter , 500, "999,99" ,255,16777215,Font2,.T.)
nRowFooter += Font2:nHeight
::say( nRowFooter, 500, "inkl. MWST" ,255,16777215,Font3,.T.)
nRowFooter += Font2:nHeight
return nil
//----------------------------------------------------------------------------//
METHOD IVClear(nRow,Font1) CLASS TInvoice
local nRowHelp := 0
local I:=0
nRowHelp := nRow
FOR I = 1 TO 15
::say( nRowHelp, 1, space(1000),255,16777215,Font1,.T.)
nRowHelp += Font1:nHeight
NEXT
return nil
//----------------------------------------------------------------------------//
METHOD IVSay(nRow,nCol,cLine,nClrFore,nClrBack,oFont) CLASS TInvoice
::say( nRow,nCol,cLine,nClrFore,nClrBack,oFont,.T.)
return nil
METHOD IVLine(nRow,nCol1,nCol2) CLASS TInvoice
::Line (nRow,nCol1,nRow,nCol2 )
return nil
METHOD IVBox(nRow,nCol1,nCol2,nRow2) CLASS TInvoice
::box (nRow,nCol1,nRow2,nCol2 )
return nil