Code: Select all
@ 120, 02 XBROWSE oBrowse OF oFolder:aDialogs[1] ;
COLUMNS 3,4,5,6,7,8,9,10,11,12,13;
HEADERS "Ico","Tipo","Servizio","Q.tà","Costo","Tot p q.tà","Dal","al","Giorni","Sconto","Totale" ;
COLSIZES 30, 30,100,50,90,90,80,80,60,90,90 ;
PICTURES nil, nil,"@!","9999","999,999,999","999,999,999", "dd-mmmm-yyyy","dd-mmmm-yyyy","999","999,99","999,999,999";
ARRAY aItems ;
SIZE 100,82 PIXEL NOBORDER
ADD COLUMN TO XBROWSE oBrowse
bCalcRow := { || (oBrowse:aCols[ 6 ]:VarPut( oBrowse:aCols[ 4 ]:Value * oBrowse:aCols[ 5 ]:Value ),;
oBrowse:aCols[ 11 ]:VarPut(( oBrowse:aCols[ 6 ]:value * oBrowse:aCols[ 9 ]:value)-oBrowse:aCols[ 10 ]:value),;
CalcoloTotali(oBrowse,aGet) )}
WITH OBJECT oBrowse
:nRowHeight := 30
WITH OBJECT oBrowse:aCols[ 1]
:bFooter := { || Ltrim( Str( oBrowse:KeyNo() ) ) + " / " + LTrim( Str( oBrowse:KeyCount() ) )+" servizi" }
:lBmpStretch := .F.
:lBmpTransparent := .T.
:nwidth := 30
:bStrImage := {|| oBrowse:aArrayData[ oBrowse:narrayat][3] }
END
WITH OBJECT oBrowse:aCols[ 2]
:AddBitmap({"INVOICE_ELEMENTO",;
"INVOICE_SERVIZIO",;
"INVOICE_PACCHETTO",;
"INVOICE_LISTINO"})
:lBtnTransparent := .t.
:bStrImage := {|| GiveType(alltrim(oBrowse:aArrayData[ oBrowse:narrayat][4])) }
END
WITH OBJECT oBrowse:aCols[ 4]
:nWidth := 100
:nDataStrAlign := AL_CENTER
:AddBitmap( { FW_BmpPlus(), FW_BmpMinus() } )
// Right Button
:nEditType := EDIT_BUTTON
:bEditBlock := { |r,c,oCol| oCol:Value + 1 }
:nBtnBmp := 1
:lBtnTransparent := .t.
// Left Button
:bBmpData := { |v,lSel| If( lSel, 2, 0 ) }
:bBmpAction := { |oCol| IIF( oCol:Value>0,oCol:VarPut( oCol:Value - 1 ),) }
:bOnChange := bCalcRow
END
// colona per totale x qut riga
WITH OBJECT oBrowse:aCols[ 6]
:nFooterType := AGGR_SUM
:cEditPicture := '@ €99,999.99'
END
WITH OBJECT oBrowse:aCols[ 7]
:nEditType := EDIT_BUTTON
:AddBitmap( "c:\work\fwh\bitmaps\calendar.bmp" )
:nBtnBmp := 1
:bEditBlock := { |r,c,o,k| XbrGetDate( o ) }
END
WITH OBJECT oBrowse:aCols[ 8]
:nEditType := EDIT_BUTTON
:AddBitmap( "c:\work\fwh\bitmaps\calendar.bmp" )
:nBtnBmp := 1
:bEditBlock := { |r,c,o,k| XbrGetDate( o ) }
END
WITH OBJECT oBrowse:aCols[ 10]
:nEditType := EDIT_GET
:bOnChange := bCalcRow
END
// colona per totale riga
WITH OBJECT oBrowse:aCols[ 11]
:nFooterType := AGGR_SUM
:cEditPicture := '@ €99,999.99'
END
WITH OBJECT oBrowse:aCols[ 12]
:AddBitmap({"INVOICE_CANCELLA","INVOICE_INCOLLA"})
:nBtnBmp := 1
:lBmpStretch := .F.
:lBmpTransparent := .T.
:nwidth := 30
:nEditType := EDIT_BUTTON
:bEditBlock := { ||DeleteRow(oBrowse,aGet) }
:nHeadBmpNo := 2
:cHeader := ""
:bLClickHeader := { ||DeleteAllRows(oBrowse,aGet) }
END
:lHscroll := .F.
:l2007 := .F.
:l2015 := .T.
:nStretchCol := STRETCHCOL_WIDEST
:nColDividerStyle := LINESTYLE_LIGHTGRAY
:lAllowRowSizing := .F.
:lAllowColSwapping := .F.
:lAllowColHiding := .F.
:nMarqueeStyle := MARQSTYLE_HIGHLROWMS
:CreateFromCode()
END