if Press "-" the value become 0 I wish the value is 1 if the value is 0
this the code
Code: Select all
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 := bCalcRow
END
I allready tried with
:bBmpAction := { |oCol| IIF( oCol:Value>0,oCol:VarPut( oCol:Value - 1 ),oCol:VarPut(1)) }
or
:bBmpAction := { |oCol| IIF( oCol:Value>0,oCol:VarPut( oCol:Value - 1 ),oCol:VarPut(oCol:Value:= 1)) }
or
:bBmpAction := { |oCol| IIF( oCol:Value>0,oCol:VarPut( oCol:Value - 1 ),1) }
with no success!!!
the value cannot be zero
any solution please ?