Retrieve and set focus
Posted: Tue Jan 19, 2016 7:57 am
Hi,
I have the following:
Customer screen with dcsay ... GET ...
2 buttons with prev/next.
When I'm in edit mode in this screen, and my cursor is on a field, if want that the focus remains on that field after clicking the buttons for skipping.
If the cursor is on address, if want it returns on address after skipping, if the focus is on phone number, i want it back on phone numer after skipping, ...
I tried the following:
The following error appears:
Any suggestions?
I have the following:
Customer screen with dcsay ... GET ...
2 buttons with prev/next.
When I'm in edit mode in this screen, and my cursor is on a field, if want that the focus remains on that field after clicking the buttons for skipping.
If the cursor is on address, if want it returns on address after skipping, if the focus is on phone number, i want it back on phone numer after skipping, ...
I tried the following:
Code: Select all
@ nRow+nBottom,5 dcpushbuttonXP notabstop BITMAP ABO_PREV1N ALIGN 4 OFFSET 3 CONFIG oConfig SIZE 10,2 CAPTION 'F1' ;
ACCELKEY xbeK_F1 ;
ACTION {|o| ... if(valtype(oOldfocus)="O",dc_setappfocus(oOldFocus),),dc_getrefresh(getlist) } ;
GOTFOCUS {|| oOldFocus:=dc_setappfocus() }
Code: Select all
oError:args :
-> VALTYPE: U VALUE: NIL
oError:canDefault : N
oError:canRetry : N
oError:canSubstitute: Y
oError:cargo : NIL
oError:description : Receiver of message is not an object.
oError:filename :
oError:genCode : 38
oError:operation : setParent
oError:osCode : 0
oError:severity : 2
oError:subCode : 2266
oError:subSystem : BASE
oError:thread : 3
oError:tries : 0