HOME DOCUMENTATION DOWNLOADS BLOG

Tab order in tab control

Recently I’ve been working on very complex screen with nested tab controls. The task was to add new tab in a given tab control and put it on the 4th position. I’ve added new tab to the end of the tab control, so it was placed on the 5th position, saved the screen, closed it and opened the screen again. The new tab was on the 3rd position.

How to fix the tab order?

Tab order in tab control is based on SchemaItemName property, which is automatically generated when a new element is added to the screen. Values for standing tabs were TabPage1, TabPage2, TabPage3 and TabPage4. Because the screen was complex and contained a lot of tabs, the newly added tab page got assigned as TabPage20. Since the ordering is string-based, it got placed on the 3rd position.

The solution is to change values of SchemaItemName property in order to achieve desired tab order.