PDA

View Full Version : How to change the title a TabItemConfig?



gui0506
6 Apr 2015, 12:27 PM
I want to make the title dynamic based on status.
I tried the following but does not work.


inputTab.setText("Input*");

Thanks.

Andreas Samjeske
7 Apr 2015, 4:23 AM
Just setting something in TabItemConfig is not enough. Your TabPanel has to get this altered TabItemConfig. Try this:


TabItemConfig tabConfig = tabPanel.getConfig(tabWidget);
tabConfig.setText("Input*");
tabPanel.update(tabWidget, tabConfig);

gui0506
7 Apr 2015, 6:58 AM
Just setting something in TabItemConfig is not enough. Your TabPenel has to get this altered TabItemConfig. Try this:


TabItemConfig tabConfig = tabPanel.getConfig(tabWidget);
tabConfig.setText("Input*");
tabPanel.update(tabWidget, tabConfig);

It works like a charm! Thank you

hargahape
2 May 2015, 12:02 PM
yes it works for me too