Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Enable/Disable Tab bug

    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

    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);
    	}
    
    }

    #2
    What version of SmartGWT are you using? There were some recent changes that were made so if you haven't tried the nightly build, please do so.

    Sanjiv

    Comment


      #3
      I have tried latest build the but problem still exist. I have tried with both GWT 1.5.3 and 1.6.4.

      Comment


        #4
        It seems that it works now with latest build. I guess it didn't worked yesterday because of some caching issue, as I didn't upgraded SmartGWT from yesterday.

        Comment


          #5
          I have exactly the same issue even if I use the SmartGWT 1.2-SNAPSHOT dated of July 12th.
          How can I resolve this issue ?
          Last edited by abaudouin; 15 Jul 2009, 05:21.

          Comment

          Working...
          X