Having a dialog with 10 vertical buttons and 10 horz buttons on bottom, when you use the tab key, button focus go round and round and with shift tab, button focus goes in reverse.
Using the arrow keys up and down or left and right makes the tab focus on buttons with same effect.
When you add labels to the top ten buttons, the arrow keys now stop at the top and at the bottom left. They do not now go from the top to the bottom left or bottom left to the top.
With this problem , what I am trying to do with accel attach is tell the program when at the top button detect 'up key' and button id (bu1) to focus on to bottom right button id (bu20) to continue looping button focus around using the arrows.
And add simular code to other arrows key detection.
I am missing something in the code below that does not work.
Hope someone can help here.
Below is my accel code.
------------------------------------------
CALLBACK FUNCTION Sel_READKey()
SELECT CASE CBMSG
CASE %WM_COMMAND
SELECT CASE CBCTL
' CASE 1001 AND CBCTL=%BU1
' CONTROL SET FOCUS hDlg, %BU28
CASE 1002 AND CBCTL=%BU1
MSGBOX "UP":CONTROL SET FOCUS hDlg, %BU28 ' %VK_PGUP %VK_PGDN %VK_LEFT %VK_UP %VK_RIGHT %VK_DOWN %VK_NUMPAD0
' CASE 1003
' GOSUB CCNT
' CASE 1004
' GOSUB CCNTR
END SELECT
END SELECT
END FUNCTION
Using the arrow keys up and down or left and right makes the tab focus on buttons with same effect.
When you add labels to the top ten buttons, the arrow keys now stop at the top and at the bottom left. They do not now go from the top to the bottom left or bottom left to the top.
With this problem , what I am trying to do with accel attach is tell the program when at the top button detect 'up key' and button id (bu1) to focus on to bottom right button id (bu20) to continue looping button focus around using the arrows.
And add simular code to other arrows key detection.
I am missing something in the code below that does not work.
Hope someone can help here.
Below is my accel code.
------------------------------------------
CALLBACK FUNCTION Sel_READKey()
SELECT CASE CBMSG
CASE %WM_COMMAND
SELECT CASE CBCTL
' CASE 1001 AND CBCTL=%BU1
' CONTROL SET FOCUS hDlg, %BU28
CASE 1002 AND CBCTL=%BU1
MSGBOX "UP":CONTROL SET FOCUS hDlg, %BU28 ' %VK_PGUP %VK_PGDN %VK_LEFT %VK_UP %VK_RIGHT %VK_DOWN %VK_NUMPAD0
' CASE 1003
' GOSUB CCNT
' CASE 1004
' GOSUB CCNTR
END SELECT
END SELECT
END FUNCTION
Comment