Update the Tab Captions

The possibility to update the Caption of the Tab of a GeneXus Tabs Control was added.

With this feature, you will be able to display icons next to the captions, update the captions at runtime displaying some extra information, change the look  & feel of a specific Tab, etc.

UpdateTabCaption1

Example of displaying an icon next to the Tab title

In the following image, there is an example of displaying an icon next to the Tab title:

UpdateTabCaption2

In order to achieve this, you need to add code in the WebPanel that loads the Tabs. In this example, these Tabs are the ones generated automatically by WorkWithPlus for Web in the View object (for Person transaction).

So, open PersonView, and in the subroutine 'LoadTabs', after the automatic generated code, add the following lines:

&HTMLTabTitle = !'<i class="%1" style="padding-right: 8px;"></i><span>%2</span>'

WWPActions.Tabs_EditCaption(LayoutMainTable.InternalName, !'Tabs', !"Email", Format(&HTMLTabTitle, !'far fa-envelope', 'Email'), true, '')

WWPActions.Tabs_EditCaption(LayoutMainTable.InternalName, !'Tabs', !"General", Format(&HTMLTabTitle, !'far fa-address-card', 'General'), true, '')

WWPActions.Tabs_EditCaption(LayoutMainTable.InternalName, !'Tabs', !"Project", Format(&HTMLTabTitle, !'fas fa-tasks', 'Project'), true, '')