nihad640 / smartgwt

Automatically exported from code.google.com/p/smartgwt
0 stars 0 forks source link

Percentage width problem with dynamicForm inside a tab #636

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
1.I have a tabSet for one tab I call:
private Tab getDescriptionTab() {
        Tab leTab = new Tab("Description");
        DynamicForm formulaire = new DynamicForm();
        formulaire.setColWidths("30%","70%");
        formulaire.setWidth("100%");
        TextItem libelle = new TextItem();
        libelle.setWidth(400);
        libelle.setTitle("Libellé");
        TextItem intitule = new TextItem();
        intitule.setWidth("80%");
        intitule.setTitle("Intitulé");
        TextAreaItem resume = new TextAreaItem();
        resume.setWidth("80%");
        resume.setTitle("Résumé");
        DateItem laDate = new DateItem();
        laDate.setTitle("Date de Création");
        laDate.setDisabled(true);
        laDate.setShowDisabled(false);
        formulaire.setItems(libelle,intitule,resume);
        leTab.setPane(formulaire);      
        return leTab;
    }
2.The TextItem which width is setup in pixel is OK

3.Other width declaration done in percentage trigger an exception and when I 
step into the code I found as a cause "FormItems do not support 
percentage sizing"
4. I already use a lot of Formitem with percentage sizing without any problem.

So what is wrong?

Regards
Alain

Windows7 or Xp Firefox

Regards
Alain

Original issue reported on code.google.com by albu.con...@gmail.com on 25 Oct 2011 at 12:25

GoogleCodeExporter commented 9 years ago
We can't tell what's wrong from just this code.  If you think your size 
settings are correct and the framework is not behaving as documented, please 
create a minimal, standalone test case demonstrating the problem.  Make sure to 
describe what you expected and why.  Then this issue will be marked valid again.

Original comment by charles....@gmail.com on 25 Oct 2011 at 3:56

GoogleCodeExporter commented 9 years ago
What puzzled me
1°)if you set up a "100%" width or height you don't receive any message.
2°) The documentation which you ask us to refer every time indicate for the 
formitem:
 void   setWidth(int width)
          Width of the FormItem.
 void   setWidth(String width) 

there is nowhere something which refer to what we can see in the source of the 
method.
Regards
Alain

Original comment by albu.con...@gmail.com on 26 Oct 2011 at 8:03