The matrix layout (IWDMatrixLayout) arranges the UI elements in a grid structure. It uses predefined cell classes that guarantee appropriate distances between cells in the grid. The vGutterproperty lets you specify additional horizontal distances easily. You can set these additional distances (known as gutters) with or without separators. The matrix layout can also include horizontal separators to separate the rows further, represented by the HorizontalGutter UI element. The distance for each cell is specified by assigning a specific enumeration value of the class WDLayoutCellSeparator of the MatrixData object. This type of layout is preferable to the Grid Layout, since it makes the layout structure in a container more consistent. Using the IWDMatrixHeadData interface, you can specify the UI element that appears at the start of each new line.
Wherever possible, you should avoid using nested matrix layouts and use row layouts instead. The row layout differs from the matrix layout in that the content is not organized in table cells. That is, the individual elements are not aligned vertically with each other. When the row layout is implemented in an application, performance is better than if a matrix layout were used, but 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 row layout. You should only use the matrix layout if you need to display a table and align the elements vertically.
●
stretchedHorizontally
Specifies whether UI elements aligned using this layout are adapted
horizontally to the container size, so that the container is completely filled
horizontally.
●
stretchedVertically
Specifies whether UI elements aligned using this layout are adapted vertically
to the container size, so that the container is completely filled vertically.
Name |
Interface |
Type |
Initial Value |
Bindable |
stretchedHorizontally |
IWDMatrixLayout |
boolean |
true |
not_bindable |
stretchedVertically |
IWDMatrixLayout |
boolean |
true |
not_bindable |