Hi
I tried variations of the code below and I can not get it to set focus on the available list when dcpicklist gets focus.
Can you help?
Thanks.
#INCLUDE "ALL.CH"
FUNCTION Main()
// Try to set focus on available items on a dcpicklist.
LOCAL GetList:={}, lOk:=.F., oPick
LOCAL aAvail:={"ONE", "TWO", "THREE", "FOUR"}, aSel:={}
@02,05 DCPICKLIST aSel LIST aAvail;
CAPTION "Available", "Selected" ;
OBJECT oPick;
EVAL {|o| o:keyboard := {|a,b,o| _Keyboard(a, b, o)}};
SIZE 35,12;
IMMEDIATE
DCREAD GUI ;
TITLE "Picklist KEYBOARD test" ;
ADDBUTTONS;
SETFOCUS @oPick;
TO lOk
IF lOk
DC_ARRAYVIEW(aSel)
ENDIF
RETURN(NIL)
*******************************************************************************
STATIC FUNCTION _Keyboard(a, b, o)
o:keyboard(xbeK_TAB)
o:keyboard(xbeK_DOWN)
o:keyboard(xbeK_UP)
RETURN(NIL)
*******************************************************************************
PROCEDURE AppSys()
RETURN
*******************************************************************************
PROCEDURE DbeSys()
RETURN
*******************************************************************************
place focus on the available list on dcpicklist
-
- Posts: 1
- Joined: Sun Oct 08, 2017 3:57 pm
Re: place focus on the available list on dcpicklist
Do this:
Code: Select all
DCREAD GUI ;
TITLE "Picklist KEYBOARD test" ;
ADDBUTTONS;
SETFOCUS @oPick;
TO lOk ;
EVAL {|o|SetAppFocus(oPick:leftListBox)}
The eXpress train is coming - and it has more cars.