I'm not sure why but verticalSpan isn't quite being respected.  Here is a 
simple test case:
     this.setLayout(new BorderLayout());
  
    TableLayout layout = new TableLayout(5,3);

    Container cnt2 = new Container();
    cnt2.getStyle().setBgColor(0xd3d3d3);
    cnt2.getStyle().setBgTransparency(255);
    cnt2.add(new Label("Activity:"));

        Container cnt1 = new Container(layout);
        cnt1.add(layout.createConstraint().widthPercentage(20), new 
Label());
        cnt1.add(layout.createConstraint().widthPercentage(40), new 
Label());
        cnt1.add(layout.createConstraint().widthPercentage(40), new 
Label());
    cnt1.add(layout.createConstraint().horizontalSpan(1), new 
Label("Last:"));
    cnt1.add(layout.createConstraint().horizontalSpan(1), new TextField());
    cnt1.add(layout.createConstraint().horizontalSpan(1), new TextField());

    cnt1.add(layout.createConstraint().horizontalSpan(1), new 
Label("First:"));
    cnt1.add(layout.createConstraint().horizontalSpan(1), new TextField());
    cnt1.add(layout.createConstraint().horizontalSpan(1).verticalSpan(4), 
cnt2);

    cnt1.add(layout.createConstraint().horizontalSpan(1), new 
Label("Age:"));
    cnt1.add(layout.createConstraint().horizontalSpan(1), new TextField());

    cnt1.add(layout.createConstraint().horizontalSpan(1), new 
Label("Height:"));
    cnt1.add(layout.createConstraint().horizontalSpan(1), new TextField());

    cnt1.add(layout.createConstraint().horizontalSpan(1), new 
Label("Weight:"));
    cnt1.add(layout.createConstraint().horizontalSpan(1), new TextField());
    cnt1.add(layout.createConstraint().horizontalSpan(1), new TextField()); 
  <-----NOTE: this empty field had to be added to align

    cnt1.add(layout.createConstraint().horizontalSpan(3), new Label("Some 
Really Long Text that represents a button panel that should span"));
this.add(BorderLayout.CENTER, cnt1);


I had to intersperse the controls with empty labels in order for the 
alignment to work.  In this test case, I used a TextField instead.  In the 
screenshot you can see the last label "Some really long text..." is 
actually showing up in the last row right column, instead of showing up in 
the next row, as it does in the 2nd screenshot when I add an empty label 
(or TextField).   The panel labelled "Activity" has a verticalSpan of 4, 
and you can see the grey color respecting that, but the label (or 
textfield) is not.   

-- 
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/1069c5d2-8aa1-429e-acf3-27066f31b8d4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to