
The MatrixLayout arranges the UI elements as a table in a grid structure. It uses predefined cell classes that guarantee appropriate margins between cells in the grid. The vGutter property lets you specify additional horizontal margins. You can set these additional distances (known as gutters) with or without separators. In addition, the MatrixLayout can include horizontal separators to separate the rows further, represented by the HorizontalGutter UI element. This type of layout is preferable to the GridLayout , since it makes the layout structure in a container more consistent. Using the interface MatrixHeadData , you can specify the UI element that appears at the start of each new line.
You should avoid using nested MatrixLayouts. Instead, use RowLayouts wherever possible. The RowLayout differs from the MatrixLayout in that the content is not organized in table cells that is, the individual elements are not aligned vertically with each other. Whenever RowLayouts are implemented in an application, performance is better than if a MatrixLayout were used, and the layout flexibility is not compromised. For this reason, you should structure the view and container in horizontal areas as early as possible, using the RowLayouts. You should only use the MatrixLayout if you need to display a table and align the elements vertically.
Implementation Details
|
Runtime Class |
CL_WD_MATRIX_LAYOUT |
|
Name |
Type |
Initial Value |
Bindable |
|---|---|---|---|
|
STRING |
(automatic) |
No |
|
|
WDY_BOOLEAN |
false |
No |
|
|
WDY_BOOLEAN |
false |
No |
|
Name |
Cardinality |
Type |
|---|---|---|
|
DRAG_SOURCE_INFO |
0..1 |
|
|
DROP_TARGET_INFO |
0..1 |
|
Name |
|---|
Layout data is not bindable.
Other properties that can be inherited are defined in the related higher-level classes. The related UI elements are:
Dynamic Programming
For dynamic programming, the same properties, events and aggregations are available as in the View Designer. However, the spelling format and use of upper/lower case is different.
|
View Designer Name |
Runtime Name |
Type |
|---|---|---|
|
STRETCHED_HORIZONTALLY |
WDY_BOOLEAN |
|
|
STRETCHED_VERTICALLY |
WDY_BOOLEAN |
Note that with dynamic programming the default values of stretchedHorizontally and stretchedVertically are set to true, whereas in the view designer they are set to false.
|
View Designer Name |
Runtime Name |
|---|---|
|
onDrop |
ON_DROP |
|
View Designer Name |
Runtime Name |
Cardinality |
|---|---|---|
|
DRAG_SOURCE_INFO |
DRAG_SOURCE_INFO |
0..1 |
|
DROP_TARGET_INFO |
DROP_TARGET_INFO |
0..1 |