TableLayout setting horizontal alignment

20 views
Skip to first unread message

Bryan Buchanan

unread,
Dec 12, 2013, 7:20:31 PM12/12/13
to codenameone...@googlegroups.com
This doesn't seem to work:

        super.beforeFindPartsForm(f);

        Container c = findPartDetailsContainer(f);
        TableLayout layout = (TableLayout) c.getLayout();

        for (int i = 0; i < 7; i++) {
            TableLayout.Constraint constraint = layout.createConstraint(i, 0);
            constraint.setHorizontalAlign(Component.RIGHT);
        }

The container has a TableLayout (7,2). I want the first column to be right aligned.

Bryan Buchanan

unread,
Dec 12, 2013, 8:48:07 PM12/12/13
to codenameone...@googlegroups.com
Solved. I needed to also create a custom UUID for the labels to right alignment. Works fine.

Reply all
Reply to author
Forward
0 new messages