I have two prg
on one prg I have column 5
Code: Select all
@ 120, 02 XBROWSE oBrowse OF oDlg ;
COLUMNS 1, 2, 3, 4, 5 ;
HEADERS "ico","Descrizione servizio","Q.tà","Prezzo","Totale" ;
COLSIZES 20, 350, 80, 120,120 ;
ARRAY aData ;
SIZE 100,82 PIXEL NOBORDER
ADD COLUMN TO XBROWSE oBrowse
bCalcRow := { || 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][1] }
END
WITH OBJECT oBrowse:aCols[ 3]
: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 := { |oCol| (CalcoloRiga(oBrowse),;
* CalcoloTotali(oBrowse,aGet)) }
:bOnChange := bCalcRow
END
WITH OBJECT oBrowse:aCols[ 4]
:nEditType := EDIT_GET
:bOnChange := bCalcRow
END
WITH OBJECT oBrowse:aCols[ 5]
:nFooterType := AGGR_SUM
:cEditPicture := '@ €99,999.99'
END
// inserisce pulsante nella colonna e sulla testata
WITH OBJECT oBrowse:aCols[ 6]
:AddBmpFile(".\bitmaps\DLG_NO_MIN.bmp")
:nBtnBmp := 1
:lBmpStretch := .F.
:lBmpTransparent := .T.
:nwidth := 30
:nEditType := EDIT_BUTTON
:bEditBlock := { ||DeleteRow(oBrowse,aGet) }
:nHeadBmpNo := 1
:cHeader := ""
:bLClickHeader := { ||DeleteAllRows(oBrowse,aGet) }
END
//---------------------------------------------//
:MakeTotals()
:lfooter := .T.
:lHscroll := .F.
:l2007 := .F.
:l2015 := .T.
:nStretchCol := STRETCHCOL_WIDEST
:lAllowRowSizing := .F.
:lAllowColSwapping := .F.
:lAllowColHiding := .F.
:nMarqueeStyle := MARQSTYLE_HIGHLROWMS
:CreateFromCode()
END
on another I have column 11
Code: Select all
@ 120, 02 XBROWSE oBrowse OF oDlg ;
COLUMNS 1,2,3,4,5,6,7,8,9,10,11;
HEADERS "Ico","Tipo","Servizio","Q.tà","Costo","Tot p q.tà","Dal","al","Giorni","Sconto","Totale" ;
COLSIZES 55, 25,130,50,90,90,140,140,50,90,120 ;
PICTURES nil, nil,"@!","9999","€ 999,999.99","€ 999,999.99", "dd-mmmm-yyyy","dd-mmmm-yyyy","999","€ 999,999.99","€ 999,999.99";
ARRAY aData ;
SIZE 100,120 PIXEL STYLE FLAT NOBORDER
//
ADD COLUMN TO XBROWSE oBrowse
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][1] }
END
WITH OBJECT oBrowse:aCols[ 2]
:AddBitmap({"INVOICE_ELEMENTO",;
"INVOICE_SERVIZIO",;
"INVOICE_PACCHETTO",;
"INVOICE_LISTINO"})
:lBmpStretch := .F.
:lBmpTransparent := .T.
:nwidth := 30
:bBmpData := {|| GiveType(alltrim(oBrowse:aArrayData[ oBrowse:narrayat][2])) }
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 := { |oCol| (CalcoloRiga(oBrowse),;
* CalcoloTotali(oBrowse,aGet)) }
* :bOnChange := bCalcRow
END
WITH OBJECT oBrowse:aCols[ 7]
:nEditType := EDIT_BUTTON
:AddBitmap( "INVOICE_CALENDAR_BMP" )
:nBtnBmp := 1
* :bEditBlock := { |r,c,o,k| XbrGetDate( o,"Seleziona una data",dStagioneMin,dStagioneMax, .t., 0.6, , ) }
:bEditBlock := { |r,c,o,k| XbrGetDate( o,"Seleziona una data",dStagioneMin,dStagioneMax ) }
* :bOnChange := bCalcRow
END
WITH OBJECT oBrowse:aCols[ 8]
:nEditType := EDIT_BUTTON
:AddBitmap( "INVOICE_CALENDAR_BMP" )
:nBtnBmp := 1
:bEditBlock := { |r,c,o,k| XbrGetDate( o,"Seleziona una data",dStagioneMin,dStagioneMax ) }
* :bOnChange := bCalcRow
END
WITH OBJECT oBrowse:aCols[ 10]
:nEditType := EDIT_GET
* :bOnChange := bCalcRow
END
WITH OBJECT oBrowse:aCols[ 11]
:nFooterType := AGGR_SUM
:cEditPicture := '@ €99,999.99'
END
WITH OBJECT oBrowse:aCols[ 12]
:AddBmpFile("INVOICE_CANCELLA2")
:nBtnBmp := 1
:lBmpStretch := .F.
:lBmpTransparent := .T.
:nwidth := 30
:nEditType := EDIT_BUTTON
:bEditBlock := { ||DeleteRow(oBrowse,aGet) }
:nHeadBmpNo := 1
:cHeader := ""
:bLClickHeader := { ||DeleteAllRows(oBrowse,aGet) }
END
:MakeTotals()
:lfooter := .T.
:lHscroll := .F.
:l2007 := .F.
:l2015 := .T.
:nStretchCol := STRETCHCOL_WIDEST
:lAllowRowSizing := .F.
:lAllowColSwapping := .F.
:lAllowColHiding := .F.
:nMarqueeStyle := MARQSTYLE_HIGHLROWMS
:CreateFromCode()
END
the source is the same on the second not run the footer ( with euro symbol)
Itried to erase this line but it is the same
PICTURES nil, nil,"@!","9999","€ 999,999.99","€ 999,999.99", "dd-mmmm-yyyy","dd-mmmm-yyyy","999","€ 999,999.99","€ 999,999.99";