Defid doesn't allow keyboard access to checkboxes

Help for writing scripts and plugins.
User avatar
Registered Opus Pro User
Posts: 493
Joined: 17 Sep 2008, 02:55
OS: Windows 10 64-bit
Opus: Latest Beta
Location: Sydney, Australia
In the interests of DOpus perfection: I have a var oDlg = DOpus.dlg dialogue with four checkboxes and a few buttons.

A. When there is no defid line such as oDlg.defid=2:
— Pressing DownArrow puts the focus amongst the checkboxes, allowing them to be ticked or unticked with the spacebar.
— Pressing the first letter of any checkbox puts the focus in that checkbox, allowing it to be ticked.
— Pressing Tab sends the focus to the first button, and then along the buttons
— Pressing Shift+Tab sends the focus back along the buttons, then up to the checkboxes.

B. When a defid line such as oDlg.defid=2 is added, however:
— Pressing DownArrow moves the cursor along the buttons, not through the checkboxes.
— Pressing a letter activates the button with that accelerator key, not the checkbox with that initial letter.
— There seems to be no way of getting the focus amongst the checkboxes, other than picking up the mouse.
— In particular, pressing Tab and Shift+Tab only runs the focus along the buttons.
— After the focus is put into the checkboxes with the mouse, the behaviour reverts to that described in A above.
This happens even with oDlg.defid = 1, which the documentation seems to say is the default.

The behaviour that I want, and would have expected, is that when I add a defid line such as oDlg.defid = 2, then the second button is highlighted, but otherwise the behaviour is the same as in A above. There is nothing in the documentation about defid affecting the focus as regards checkboxes, and the last point in B seems to confirm that it's a glitch.

Return to “Script & Plugin Development”