oCol:bEditWhen := { || oBrw:BookMark == 1 }
#include "fivewin.ch"
function Main()
local oDlg, oBrw
USE c:\work\FWH\SAMPLES\CUSTOMER
DEFINE DIALOG oDlg SIZE 700,400 PIXEL TRUEPIXEL
@ 20,20 XBROWSE oBrw SIZE -20,-20 PIXEL OF oDlg DATASOURCE Alias() ;
AUTOCOLS CELL LINES NOBORDER
WITH OBJECT oBrw:aCols[ 2 ]
:nEditType := EDIT_BUTTON
:AddResource( "OPEN" )
:nBtnBmp := 1
:bEditBlock := { || test()}
:beditwhen := { || oBrw:keyno <> 1 }
END
oBrw:CreateFromCode()
ACTIVATE DIALOG oDlg CENTERED
return nil
Function test()
return "modified"
WITH OBJECT oBrw:aCols[ 4]
:AddBmpFile(".\bitmaps\sh_minus.bmp")
:nBtnBmp := 1
:nwidth := 40
:nEditType := EDIT_BUTTON
:bEditBlock := { ||IF(oBrw:KeyNo=1,,IIF(RES->QUANTITY>1, RES->QUANTITY--,RES->QUANTITY:= 1)) }
:lBtnTransparent := .t.
:lBmpStretch := .t.
:nDataStrAlign := AL_CENTER
:nHeadStrAlign := AL_CENTER
END
WITH OBJECT oBrw:aCols[ 5]
:AddBmpFile(".\bitmaps\sh_plus.bmp")
:nBtnBmp := 1
:nwidth := 60
:nDataStrAlign := AL_CENTER
:nHeadStrAlign := AL_CENTER
:nEditType := EDIT_BUTTON
:bEditBlock := { ||IF(oBrw:KeyNo=1,,RES->QUANTITY++) }
:lBtnTransparent := .t.
END
is there a bug on bwhenedit codeblock ?
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: nageswaragunupudi, Surasak and 31 guests