It seems to me that enable/disable tab feature is not working correctly.
If tab is disabled when initialized, and then enabled in the runtime it won't appear enabled until user hovers mouse over it.
Also, if you then try to disable tab it will look enabled even it is disabled. Hovering mouse over it won't help this time.
Here is test that shows this problem. Clicking button should enable/disable Tab2 but it does not change visual appearance correctly
If tab is disabled when initialized, and then enabled in the runtime it won't appear enabled until user hovers mouse over it.
Also, if you then try to disable tab it will look enabled even it is disabled. Hovering mouse over it won't help this time.
Here is test that shows this problem. Clicking button should enable/disable Tab2 but it does not change visual appearance correctly
Code:
import com.smartgwt.client.widgets.IButton; import com.smartgwt.client.widgets.events.ClickEvent; import com.smartgwt.client.widgets.events.ClickHandler; import com.smartgwt.client.widgets.layout.VLayout; import com.smartgwt.client.widgets.tab.Tab; import com.smartgwt.client.widgets.tab.TabSet; public class TabTest extends VLayout { public TabTest() { final TabSet tabSet = new TabSet(); tabSet.setWidth(400); tabSet.addTab(new Tab("Tab 1")); tabSet.addTab(new Tab("Tab 2")); tabSet.disableTab(1); addMember(tabSet); final IButton button = new IButton("Enable"); button.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { if (tabSet.getTab(1).getDisabled()) { tabSet.enableTab(1); button.setTitle("Disable"); } else { tabSet.disableTab(1); button.setTitle("Enable"); } //tabSet.markForRedraw(); } }); addMember(button); } }
Comment