In some cases, you may want to show, hide, or change the style -Class- to the tabs on a Tab Control in design or runtime based on different conditions.
In order to do this, each Tab Page Control on a Tab Control is defined with its own name and can be modified separately.
- Visible
- Enabled
- Class
- SelectedClass
Changing a single tab Selected Class
Event 'ChangeTabClass'
TabPage3.SelectedClass = 'TabPageSelected2'
EndEvent
Hiding a tab depending on user roles
Event Refresh
UserIsAdmin(&Boolean)
If &Boolean
TabConfiguration.Visible = True
Else
TabConfiguration.Visible = False
EndIf
EndEvent