On my iMac with macOS 11.1 it is possible to jump via Tab key from one control to the next control. And it is no matter if they first control is a TextField and the next control is a Radiobutton Group. I reach every control.
In Windows I’ve tried to solve this problem with the implementation of the event KeyDown. So it is possible to jump from a TextField to the next control - a RadioButton Group - with SetFocus.
The RadioButton Group contains two RadioButtons. With SetFocus I reach only the first RadioButton, not the second RadioButton. But it is possible to jump to the next RadioButton Group using the SetFocus into the event KeyDown.
Is there a setting in Windows 10 to allow to change the focus with keyboard navigation?
I work with XOJO version 2020 release 2.1 .
usually u set the tab order in the ide in the ui form editor at top there is a toolbar icon looks like a Z.
and the control itself have a tabstop settings and a tabindex for manual order.
Select a Control from the window before accessing the Tab order Menu that let you set graphically (with the Mouse) the Control order.
Thank you. The tab order is already set there “left to right, top to bottom”.
I think you mean with “Control order” the tab index?
I’ve already set in focus control the tab index for all controls.
Keep in mind that the left-to-right, top-to-bottom thing you clicked is a one-off thing, that is it looked at the controls at that very moment and set their tab order. If you added more controls, you’ll need to select that item again.
Don’t do both. Selecting the tab order with one of the helpers in the command bar overrides the tab order in the inspector.
Okay. The tab order of my app works in the mac application but it is not working in the windows application.
Have you set the order using the IDE MenuItem ?
I’ve set the order into the inspector via the tab index of the control.
Personally I wouldn’t try to tab to every control in a radio group, as you’re overriding standard windows behaviour. A radio group is considered one control for tab purposes and when you are in there you would use the arrow keys to navigate the group. To see an example of this run notepad, File>Page Setup and tab to orientation, note you can’t tab to Landscape, when you are on Portrait you press down arrow to get to Landscape, this is how things are on windows and any regular windows keyboard user would expect this. It would potentially break all sorts of norms including screen readers and limited mobility access features by overriding it.
What you’re trying to do would be akin to tabbing to a combobox then being able to tab through each entry in the combobox, this doesn’t happen, you would be expected to use the arrow keys to navigate the list of the combobox.
Hope it helps, of course you can do what you like with your app, I’m just making the suggestion
Personaly, Iprefer to use the graphical way:
Setting the Tab Order the UI Interface way:
PS: interface at work. The PB_Add(s) PushButtons name have to be changed to what they are meant to.
I have an app where the customer wants to be able to tab from control to control. In macOS this happens without my intervention. In macOS I can enable or disable this behavior via the keyboard settings. In Windows I just didn’t know it.
I will implement the navigation by arrow key in the radio group. The default (standard) should not be overridden in my app.
Here is a screen capture as an example (only a part of the screen).
You can see that here TextField, RadioButton and CheckBox are present in a colorful order. There are also inactive fields. In macOS the navigation via Tab key works without my intervention. In Windows I have to add something.
I will follow Julian’s tip (use arrow keys for navigation within a RadioButton group). The window has a resolution of 2560x1315 - exactly as the customer wanted it. Currently there are about 140 controls on the screen. And the customer wants more… So I have a little work to implement the desired control
And with macOS, you can access the binokular PopupMenu with the Keyboard ?
No click ?
No. That was a misunderstanding. The Tab key only takes me to the next control.
My first problem was to reach every control by pressing the tab key.
The second problem is to select something. In case of the PopUpMenu I have to implement something into the KeyDown event:
select case key.Asc
case 30 // Pfeil nach oben
if me.SelectedRowIndex > 0 then
me.SelectedRowIndex = me.SelectedRowIndex - 1
case 31 // Pfeil nach unten
if me.SelectedRowIndex < me.LastRowIndex then
me.SelectedRowIndex = me.SelectedRowIndex + 1