[SOLVED] Tab order

Answered Closed
0
0

Hi,

When I add controls on a page programmatically, I would expect to be able to move from one control to the other using the tab key. However, the tab order, which I would expect to follow the order the controls were added on the page, is random.

Best regards,

Alex

  • You must to post comments
Best Answer
0
0

Setting the TabIndex works!

Alex

  • You must to post comments
0
0

Perfect, thanks! I’ll check what happens when the tabindex is all zero or all the same number. Could be that the framework crawls the DOM or uses the internal hash.

  • You must to post comments
0
0

Hi Luca,

In my case I have what I call a FormBuilder which basically is a TableViewLayout into which I add the controls. And I might have more than one FormBuilders in a Form. I create the first one, add its controls one by one, place it on the container. Create the second one, place its controls and place it on the container. And so on. In this case the container is the tabpage of a TabControl.

In a tabpage with 4 formbuilders, when I press the tab key, the focus jumps randomly on controls in all 4 FormViewBuilders and as well on tabs of the containing TabControl. It’s certainly not the order I put them on the page or z-index (the reverse as you said). It’s random.

I will try to set the TabIndex and let you know.

Alex

  • You must to post comments
0
0

Looks like all the controls have TabIndex = 0. When two controls have the same tab index I think that the javascript focus manager decides where to go next by using the z-order (not sure, have to check) which is actually the opposite of the order in the collection.

The TabIndex property is not increased automatically since there is no internal counter and child objects can have a different tab order within their container.

Did you try to set the TabIndex?

 

  • You must to post comments
Showing 4 results