eparamo
(Eduardo Paramo)
October 27, 2020, 6:35pm
#1
Setting Caption and Icon on a tabsheet does not seem to work on JAVA it works if I do it on the descriptor… but from java code i cant do something like
tabUsuarios.setIcon(icons.get(CubaIcon.WARNING));
tabUsuarios.setCaption("TEST");
thank you for the support
Pinyazhin
(Roman Pinyazhin)
October 30, 2020, 5:47am
#3
Hello @eparamo ,
The right way to set icon and caption to Tab from Java is the following:
@Inject
private TabSheet tabSheet;
@Subscribe
public void onInit(InitEvent event) {
TabSheet.Tab tab = tabSheet.getTab("tab");
tab.setIconFromSet(CubaIcon.WARNING);
tab.setCaption("Tab caption");
}
If you inject a specific tab from TabSheet in the controller will be injected the content of this tab (with VBoxLayout type).