Of course I dont quite understand the idea...that's why I am asking for 
help, maybe what you dont quite understand is that I am asking for help??? 
 All I am looking for is a very simple table layout (I preferr to walk 
before I run)
[ cell 1][ cell 2][ cell 3][ cell4     ]
[Version][String that spans 3 cells    ]
[ button 1      ][ button 2            ]

So now I tried this way:
     layout.setGrowHorizontally(true);
    Constraint c1 = layout.createConstraint().horizontalSpan(1); 
c1.setWidthPercentage(25);
cnt1.add(c1, new Label("Version:"));
  Constraint c2 = layout.createConstraint().horizontalSpan(3); 
c2.setWidthPercentage(75);
cnt1.add(c2, "Test");
    Constraint c3 = layout.createConstraint().horizontalSpan(2); 
c1.setWidthPercentage(50);
cnt1.add(c3, btnSave);
    Constraint c4 = layout.createConstraint().horizontalSpan(2); 
c1.setWidthPercentage(50);
cnt1.add(c4, btnSave2);

this.add(BorderLayout.CENTER, cnt1);


The problem is the same as always, it never shows anything beyond the first 
column.
And 2nd problem is that you dont allow function chaining on 
setWidthPercentage() :(

<https://lh3.googleusercontent.com/-Oj_pACPworc/V499I-O9E0I/AAAAAAAAEFU/pJOr3drm1bgN-rhOvI6anrdp8iQK8TO7wCLcB/s1600/Screenshot%2Bfrom%2B2016-07-20%2B06-30-52.png>

Peter

On Tuesday, July 19, 2016 at 10:26:24 PM UTC-7, Shai Almog wrote:
>
> I don't think you quite understand the idea of spanning here. If you want 
> to increase the width of the table spanning will make no difference. You 
> need to use the width constraint.
>

-- 
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/fce468c9-77a0-475d-9ef0-a52144ab14cf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to