You didn't actually indicate your expectations in the original question so 
I guessed them (correctly). 

The cells do span. The problem in your case is that you gave varying widths 
to spanned columns assuming you are assigning them to the total of the 
columns when in fact width only applies to the current column. This becomes 
a bit tricky with spanning and varying rows so as a workaround I just added 
an invisible row to set the widths as such:

        TableLayout tl = new TableLayout(4, 4);
        tl.setGrowHorizontally(true);
        Form f = new Form("Table", tl);  
        f.add(tl.createConstraint().widthPercentage(25), new Label()).
                add(tl.createConstraint().widthPercentage(25), new Label()).
                add(tl.createConstraint().widthPercentage(25), new Label()).
                add(tl.createConstraint().widthPercentage(25), new Label());
        f.add(new Label("Version:")).
                add(tl.createConstraint().horizontalSpan(3), new Label(
"Test")).
                add(tl.createConstraint().horizontalSpan(2), new Button("Save 
1")).
                add(tl.createConstraint().horizontalSpan(2), new Button("Save 
2"));
                        
        f.show();                        



<https://lh3.googleusercontent.com/-Adt6zWWK7pY/V5BZmaX6-OI/AAAAAAAAt9U/jGFUfhs-E5g-yHkK_ibfXnIUyBmXMg12wCLcB/s1600/CodenameOne%2BScreenshot%2B6.png>

<https://lh3.googleusercontent.com/-Adt6zWWK7pY/V5BZmaX6-OI/AAAAAAAAt9U/jGFUfhs-E5g-yHkK_ibfXnIUyBmXMg12wCLcB/s1600/CodenameOne%2BScreenshot%2B6.png>

-- 
You received this message because you are subscribed to the Google Groups 
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/dd44a697-ecf6-4560-ab1b-55ca1aa72918%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to