Table Layout Item - Alignment Property

Alignment of a control within a cell

Member of Table Layout Item (PRIM_TBLO.Item)

Data Type - Enumeration

Details

The Alignment property governs the position of the managed control within its cell defined by the Row, Column, RowSpan and ColumnSpan.

If the cell resizes or moves, the control will reposition as required, following the alignment rules.

Allowed Values

Enum Value

Description

BottomCenter

Horizontally centered and attached to the bottom edge

BottomLeft

Left justified and attached to the bottom edge

BottomRight

Right justified and attached to the bottom edge

Center

Horizontally and vertically centered

CenterLeft

Left justified and vertically centered

CenterRight

Right justified and vertically centered

TopCenter

Horizontally centered and attached to the upper edge

TopLeft

Left justified and attached to the upper edge

TopRight

Right justified and attached to the upper edge

Example

In this example, both buttons have an Alignment of Center and both are in Row2, Column2.

However, Button2 has a RowSpan and ColumnSpan of 2 with the result that it is centered in a 2x2 area.

     Begin_Com Role(*EXTENDS #PRIM_WEB) Height(457) Width(889) Layoutmanager(#TableLayout1) 

Define_Com Class(#PRIM_TBLO) Name(#TableLayout1)
Define_Com Class(#PRIM_TBLO.Column) Name(#Column1) Displayposition(1) Parent(#TableLayout1)
Define_Com Class(#PRIM_TBLO.Column) Name(#Column2) Displayposition(2) Parent(#TableLayout1)
Define_Com Class(#PRIM_TBLO.Column) Name(#Column3) Displayposition(3) Parent(#TableLayout1)
Define_Com Class(#PRIM_TBLO.Column) Name(#Column4) Displayposition(4) Parent(#TableLayout1)
Define_Com Class(#PRIM_TBLO.Row) Name(#Row1) Displayposition(1) Parent(#TableLayout1)
Define_Com Class(#PRIM_TBLO.Row) Name(#Row2) Displayposition(2) Parent(#TableLayout1)
Define_Com Class(#PRIM_TBLO.Row) Name(#Row3) Displayposition(3) Parent(#TableLayout1)
Define_Com Class(#PRIM_TBLO.Row) Name(#Row4) Displayposition(4) Parent(#TableLayout1)
Define_Com Class(#PRIM_TBLO.Item) Name(#LayoutItem1) Column(#Column2) Manage(#Button1) Parent(#TableLayout1) Row(#Row2) Sizing(None)
Define_Com Class(#PRIM_TBLO.Item) Name(#LayoutItem2) Column(#Column2) Manage(#Button2) Parent(#TableLayout1) Row(#Row2) Sizing(None) Rowspan(2) Columnspan(2)

Define_Com Class(#PRIM_PHBN) Name(#Button1) Caption('Button1') Displayposition(1) Left(294) Parent(#COM_OWNER) Tabposition(1) Top(160)
Define_Com Class(#PRIM_PHBN) Name(#Button2) Caption('Button2') Displayposition(2) Left(405) Parent(#COM_OWNER) Tabposition(2) Top(217)

End_Com

See also

All Component Classes

Technical Reference

  • No labels