- Code: Select all Expand view
oBrw:aCols[ 3 ]:nEditType := EDIT_BUTTON
oBrw:aCols[ 3 ]:bEditBlock := { |nRow,nCol,oCol,nKey| YourAction( nRow, nCol, oCol, nKey ) }
nRow,nCol: row and col of the click
oCol : Column Object
nKey : Key code if the action is triggered by pressing a key
Return value of the codeblock:
a) NIL: If the codeblock returns nil, XBrowse does not take any action on its own.
b) uVal: If the codeblock returns any value other than nil, XBrowse assigns that value to the column and saves it.
If the intention of the programmer is to modify the value of the column, the correct way is the return the new value and not to modify the value by the programmer himself.
EDIT_BUTTON Vs EDIT_GET_BUTTON:
EDIT_BUTTON: Only action possible by the user is to invoke the Action by clicking the button or pressing Enter
EDIT_GET_BUTTON: User can either enter a value or click the button to invoke the action.