Question about close the tab

There are five tabs on tabbar, one of them can not be closed,and the others can be closed.
how to resolve the problem?
thanks.

enableTabCloseButton doesn’t allow to define the tabs those can be closed. But you may call this method with true parameter before adding closable tabs and with false before the tab that should stay visible:

tabbar.enableTabCloseButton(true);
tabbar.addTab(“a1”,“Tab 1-1”,“100px”);

/non-closable tab/
tabbar.enableTabCloseButton(false);
tabbar.addTab(“a2”,“Tab 1-2”,“100px”);

tabbar.enableTabCloseButton(true);
tabbar.addTab(“a3”,“Tab 1-3”,“100px”);