Page 1 of 1
DCGET and TABPAGES
Posted: Thu Jan 27, 2022 9:37 am
by Maxz

- screenshot1.jpg (79.86 KiB) Viewed 5443 times
looking at this example, how do I continue the GET that is in tabpage1 after giving ENTER key on field 6 ?
when I confirm the value in field 6, the DCREAD ends because i use the ENTEREXIT clause on DCREAD GUI ...
The other GET of tabpage 1 (7,8,9,etc.) or tabpage 2/3/4 are not considered unless I position myself with the mouse manually
do I have to use some option like GROUP or TABGROUP on DCSAYGET ?
Re: DCGET and TABPAGES
Posted: Thu Jan 27, 2022 11:17 am
by rdonnay
You can try using the LOSTFOCUS clause on get 6 to set focus to get 7. You will need an ID on Get 7.
SetAppFocus(DC_GetObject(GetList, 'GET_7'))
Re: DCGET and TABPAGES
Posted: Thu Jan 27, 2022 11:50 am
by Maxz
LOSTFOCUS on GET #6 only works well if you give enter with the keyboard
if you try to move in another GET using mouse when you are positioned on GET #6, LOSTFOCUS runs first and wins over your mouse move
LOSTFOCUS should check that the user has actually given send with the keyboard
is it possible to check the ENTER_KEY event on the LOSTFOCUS clause?
Re: DCGET and TABPAGES
Posted: Thu Jan 27, 2022 12:40 pm
by rdonnay
LOSTFOCUS should check that the user has actually given send with the keyboard
The use the KEYBOARD clause instead of LOSTFOCUS
Re: DCGET and TABPAGES
Posted: Thu Jan 27, 2022 2:16 pm
by Maxz
dcsay get ....
KEYBLOCK {|n,x,o|IIF(n==xbeK_ENTER,myfunction(GetList),nil) }
//LOSTFOCUS {||DC_SetAppFocus(oTabPage1),DC_GetRefresh(GetList),SetAppFocus(oField7)}
function myfunction (GetList)
DC_SetAppFocus(oTabPage1)
DC_GetRefresh(GetList)
SetAppFocus(oField7)
return nil
it does not work properly because at the end of myfunction routine, the cursor is back on the first GET #1
where's my error ?
Re: DCGET and TABPAGES
Posted: Thu Jan 27, 2022 3:33 pm
by rdonnay
Try DCGETOPTIONS NOSUPERVISE
Re: DCGET and TABPAGES
Posted: Mon Jan 31, 2022 3:52 pm
by Maxz
this works properlyl
thanks Roger!