isomorphic-software / smartgwt

Smart GWT is a GWT-based framework that allows you to not only utilize its comprehensive widget library for your application UI, but also tie these widgets in with your server-side for data management.
37 stars 22 forks source link

Problem while setting the tab width in combination with using setUseSimpleTabs #663

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

I found a bug related to the tabSet.setUseSimpleTabs() and tab.setWidth() in 
Version 3.0 of Smart GWT while migrating from Smart GWT 2.5...

What steps will reproduce the problem?
1. Run example code with SmartGWT 2.5
2. Look at the tab size
3. Run example code with SmartGWT 3.0
4. Look at the tab size

What is the expected output? What do you see instead?
1. Run example code with SmartGWT 2.5
-> The tabs will have the size set with tab.setWidth()
3. Run example code with SmartGWT 3.0
-> .setWidth() will be ignored

What version of the product are you using? On what operating system?
- Smart GWT 3.0, GWT 2.4, Win7

What browser(s) does this happen in?  Are there any browsers where the
issue does not occur?
- Firfox 10

Example Code
--
import com.smartgwt.client.widgets.layout.VLayout;
import com.smartgwt.client.widgets.tab.Tab;
import com.smartgwt.client.widgets.tab.TabSet;

import com.google.gwt.core.client.EntryPoint;

public class TabExample implements EntryPoint {

   public void onModuleLoad() {
      final TabSet tabSet = new TabSet();
      tabSet.setUseSimpleTabs(true);

      Tab tab1 = new Tab(); 
      tab1.setTitle("Tab1");
      tab1.setWidth(20);

      Tab tab2 = new Tab();
      tab2.setTitle("Tab2");
      tab2.setWidth(30);

      tabSet.addTab(tab1);
      tabSet.addTab(tab2);      

      VLayout vLayout = new VLayout();  
      vLayout.addMember(tabSet);  
      vLayout.setHeight("100%");
      vLayout.setWidth("100%");

      vLayout.draw();
   }
}

Thank you very much for your efforts!

Malte

Original issue reported on code.google.com by MalteAhr...@gmail.com on 26 Mar 2012 at 7:03

GoogleCodeExporter commented 9 years ago
setWidth() is not ignored if the width is larger than the text.  If the problem 
you're having is that you want to clip the text, setAttribute("overflow", 
"hidden") to enable this.

Provisionally setting this to Invalid pending your response.

Original comment by smartgwt...@gmail.com on 26 Mar 2012 at 6:51