xBrowse EDIT_GET_BUTTON
Posted: Tue Nov 20, 2012 7:06 pm
Dear Antonio / Mr. Rao.
the clause EDIT_GET_BUTTON has little documentation and i need your help (Fwh 1202)
This is my code to define a column:
The question is: Is there a way to assign a firekey to call my function in :bEditBlock ?
example:
When you are doing an invoice with many items, the user is more alike to use the keyboard instead of clicking in the small button with the mouse.
I would apreciate much if you send a small sample
Thanks for your reply
Ralph
the clause EDIT_GET_BUTTON has little documentation and i need your help (Fwh 1202)
This is my code to define a column:
Code: Select all
REDEFINE XBROWSE oBrwDeta ID 301 OF oFld:aDialogs[2] ALIAS "TMPD"
....
nx := len(oBrwDeta:aCols)
oBrwDeta:aCols[ nx ]:nEditType := EDIT_GET_BUTTON
oBrwDeta:aCols[ nx ]:bEditBlock := { | r,c,o | o:value := PickPrd(o:value) }
oBrwDeta:aCols[ nx ]:bOnPostEdit := { | oCol, xVal, nKey | If( RecCount() == 0, ;
( tmpd->(DbAppend()), oBrw:Refresh() ),), If( nKey == VK_RETURN, TMPD->CODPRD := xVal,),;
oBrwDeta:RefreshCurrent()}
example:
Code: Select all
oBrwDeta:aCols[ nx ]:bToolTip := {|| oBrwDeta:aCols[ nx ]:cToolTip := "Press F2 to call list" }
I would apreciate much if you send a small sample
Thanks for your reply
Ralph