GridLayout

The grid layout is a layout that arranges the UI elements in the UI element container in the form of a grid. The number of grid columns can be specified using the GridLayout property colCount.

Padding can be specified in two ways:

  • In the GridLayout using GridLayout.cellPadding
  • In the GridData using GridLayout.paddingLeft, or GridLayout.paddingRight, etc.

Both ways are possible. If you set the padding on the GridLayout, padding is set evenly on each cell, as shown in the figure in GridLayout Properties.

You can also specify padding on each cell. Paddings specified on GridLayouts and GridData are added up.

Runtime Class

CL_WD_GRID_LAYOUT

Properties in View Designer

Name Type Initial Value Bindable

id

STRING

(automatic)

No

cellPadding

I

0

No

cellSpacing

I

0

No

colCount

I

1

No

layoutFixed WDY_BOOLEAN false Yes
legendId WDY_MD_UI_ELEMENT_REFERENCE Yes

stretchedHorizontally

WDY_BOOLEAN

true

No

stretchedVertically

WDY_BOOLEAN

true

No

Aggregations in the View Designer

Events in View Designer

Name

onDrop

Dynamic Programming

For dynamic programming, the same properties, events, and aggregations as in the View Designer are available. But note that the spelling format and use of upper/lower case is different.

Dynamic Programming of Properties

View Designer Name Runtime Name Type

cellPadding

CELL_PADDING

I

cellSpacing

CELL_SPACING

I

colCount

COL_COUNT

I

layoutFixed LAYOUT_FIXED WDY_BOOLEAN
legendId LEGEND_ID WDY_MD_UI_ELEMENT_REFERENCE

stretchedHorizontally

STRETCHED_HORIZONTALLY

WDY_BOOLEAN

stretchedVertically

STRETCHED_VERTICALLY

WDY_BOOLEAN

Dynamic Programming of Events

View Designer Name Runtime Name

onDrop

ON_DROP

Dynamic Programming of Aggregations

View Designer Name Runtime Name Cardinality

DRAG_SOURCE_INFO

DRAG_SOURCE_INFO

0..1

DROP_TARGET_INFO

DROP_TARGET_INFO

0..1