Table Layout

LANSA Version 13 SP2

Table Layout


Table layout is new layout manager similar in concept to the Version 12 Grid layout or a table in Microsoft Word.

A table is split in to a series of columns and rows, each of which occupies a percentage or fixed pixel width portion of the space available. Controls to be laid out are given a layout item that specifies a row and column, and further allows a row span and column span to be specified.

Unlike most layout managers, Table allows controls to occupy the same space, greatly simplifying the creation of complex UI layouts.

The code below defines a table of 3 columns and 4 rows, the fourth being of fixed height. The table item manages #Control and will resize it to fill the first row.

Define_Com Class(#prim_tblo) Name(#TableLayout)

Define_Com Class(#Prim_tblo.Column) Name(#TColumn1) Parent(#TableLayout)

Define_Com Class(#Prim_tblo.Column) Name(#TColumn2) Parent(#TableLayout)

Define_Com Class(#Prim_tblo.Column) Name(#TColumn3) Parent(#TableLayout)

Define_Com Class(#Prim_tblo.Row) Name(#TRow1) Parent(#TableLayout)

Define_Com Class(#Prim_tblo.Row) Name(#TRow2) Parent(#TableLayout)

Define_Com Class(#Prim_tblo.Row) Name(#TRow3) Parent(#TableLayout)

Define_Com Class(#Prim_tblo.Row) Name(#Trow4) Height(70) Parent(#TableLayout) Units(Pixels)

Define_Com Class(#Prim_tblo.Item) Name(#TableItem1) Column(#TColumn1) Columnspan(3) Manage(#Control) Parent(#TableLayout) Row(#TRow1)

See Table Layout Manager in the Visual LANSA Developer Guide.