Class sap.m.FlexBoxModule: sap/m/FlexBox
The sap.m.FlexBox control builds the container for a flexible box layout.
Browser support: This control is not supported in Internet Explorer 9!
sClassName and enriches it with the information contained in oClassInfo.sap.m.FlexBox. Accepts an object literal mSettings that defines initial property values, aggregated and associated objects as well as event handlers. See sap.ui.base.ManagedObject for a general description of the syntax of the settings object.
The supported settings are:
- Properties
- height : sap.ui.core.CSSSize (default: )
- width : sap.ui.core.CSSSize (default: )
- displayInline : boolean (default: false)
- direction : sap.m.FlexDirection (default: Row)
- fitContainer : boolean (default: false)
- renderType : sap.m.FlexRendertype (default: Div)
- justifyContent : sap.m.FlexJustifyContent (default: Start)
- alignItems : sap.m.FlexAlignItems (default: Stretch)
- wrap : sap.m.FlexWrap (default: NoWrap)
- alignContent : sap.m.FlexAlignContent (default: Stretch)
- backgroundDesign : sap.m.BackgroundDesign (default: Transparent)
- Aggregations
- items : sap.ui.core.Control[] (default)
In addition, all settings applicable to the base type sap.ui.core.Control can be used as well.
| {string} | sId? | id for the new control, generated automatically if no id is given |
| {object} | mSettings? | initial settings for the new control |
sClassName and enriches it with the information contained in oClassInfo. oClassInfo might contain the same kind of information as described in sap.ui.core.Control.extend.
| {string} | sClassName | Name of the class being created |
| {object} | oClassInfo? | Object literal with information about the class |
| {function} | FNMetaImpl? | Constructor function for the metadata object; if not given, it defaults to sap.ui.core.ElementMetadata |
| {function} | Created class / constructor function |
| {sap.ui.base.Metadata} | Metadata object describing this class |
items. | {sap.ui.core.Control} | oItem | the item to add; if empty, nothing is inserted |
| {sap.m.FlexBox} | Reference to this in order to allow method chaining |
items. | {sap.m.FlexBox} | Reference to this in order to allow method chaining |
alignContent. Determines the layout behavior of container lines when there's extra space along the cross-axis. This property has no effect in Internet Explorer 10.
Default value is Stretch.
- Since:
- 1.36.0
| {sap.m.FlexAlignContent} | Value of property alignContent |
alignItems. Determines the layout behavior of items along the cross-axis. "Baseline" is not supported in Internet Explorer 10.
Default value is Stretch.
| {sap.m.FlexAlignItems} | Value of property alignItems |
backgroundDesign. Defines the background style of the sap.m.FlexBox.
Default value is Transparent.
- Since:
- 1.38.5
| {sap.m.BackgroundDesign} | Value of property backgroundDesign |
direction. Determines the direction of the layout of child elements.
Default value is Row.
| {sap.m.FlexDirection} | Value of property direction |
displayInline. Determines whether the sap.m.FlexBox is in block or inline mode.
Default value is false.
| {boolean} | Value of property displayInline |
fitContainer. Determines whether the sap.m.FlexBox will be sized to completely fill its container. If the sap.m.FlexBox is inserted into a Page, the property 'enableScrolling' of the Page needs to be set to 'false' for the FlexBox to fit the entire viewport.
Default value is false.
| {boolean} | Value of property fitContainer |
height. The height of the sap.m.FlexBox. Note that when a percentage is given, for the height to work as expected, the height of the surrounding container must be defined.
Default value is .
- Since:
- 1.9.1
| {sap.ui.core.CSSSize} | Value of property height |
items. Flex items within the flexible box layout
| {sap.ui.core.Control[]} |
justifyContent. Determines the layout behavior along the main axis.
Default value is Start.
| {sap.m.FlexJustifyContent} | Value of property justifyContent |
renderType. Determines whether the layout is rendered as a series of divs or as an unordered list (ul)
Default value is Div.
| {sap.m.FlexRendertype} | Value of property renderType |
width. The width of the sap.m.FlexBox. Note that when a percentage is given, for the width to work as expected, the width of the surrounding container must be defined.
Default value is .
- Since:
- 1.9.1
| {sap.ui.core.CSSSize} | Value of property width |
wrap. Determines the wrapping behavior of the flex container. This property has no effect in older browsers, e.g. Android Native 4.3 and below.
Default value is NoWrap.
- Since:
- 1.36.0
| {sap.m.FlexWrap} | Value of property wrap |
sap.ui.core.Control in the aggregation items. and returns its index if found or -1 otherwise. | {sap.ui.core.Control} | oItem | The item whose index is looked for |
| {int} | The index of the provided control in the aggregation if found, or -1 otherwise |
items. | {sap.ui.core.Control} | oItem | the item to insert; if empty, nothing is inserted |
| {int} | iIndex | the 0-based index the item should be inserted at; for a negative value of iIndex, the item is inserted at position 0; for a value greater than the current size of the aggregation, the item is inserted at the last position |
| {sap.m.FlexBox} | Reference to this in order to allow method chaining |
items. Additionally, it unregisters them from the hosting UIArea.
| {sap.ui.core.Control[]} | An array of the removed elements (might be empty) |
items. | {int|string|sap.ui.core.Control} | vItem | The itemto remove or its index or id |
| {sap.ui.core.Control} | The removed item or null |
alignContent. Determines the layout behavior of container lines when there's extra space along the cross-axis. This property has no effect in Internet Explorer 10.
When called with a value of null or undefined, the default value of the property will be restored.
Default value is Stretch.
| {sap.m.FlexAlignContent} | sAlignContent | New value for property alignContent |
- Since:
- 1.36.0
| {sap.m.FlexBox} | Reference to this in order to allow method chaining |
alignItems. Determines the layout behavior of items along the cross-axis. "Baseline" is not supported in Internet Explorer 10.
When called with a value of null or undefined, the default value of the property will be restored.
Default value is Stretch.
| {sap.m.FlexAlignItems} | sAlignItems | New value for property alignItems |
| {sap.m.FlexBox} | Reference to this in order to allow method chaining |
backgroundDesign. Defines the background style of the sap.m.FlexBox.
When called with a value of null or undefined, the default value of the property will be restored.
Default value is Transparent.
| {sap.m.BackgroundDesign} | sBackgroundDesign | New value for property backgroundDesign |
- Since:
- 1.38.5
| {sap.m.FlexBox} | Reference to this in order to allow method chaining |
direction. Determines the direction of the layout of child elements.
When called with a value of null or undefined, the default value of the property will be restored.
Default value is Row.
| {sap.m.FlexDirection} | sDirection | New value for property direction |
| {sap.m.FlexBox} | Reference to this in order to allow method chaining |
displayInline. Determines whether the sap.m.FlexBox is in block or inline mode.
When called with a value of null or undefined, the default value of the property will be restored.
Default value is false.
| {boolean} | bDisplayInline | New value for property displayInline |
| {sap.m.FlexBox} | Reference to this in order to allow method chaining |
fitContainer. Determines whether the sap.m.FlexBox will be sized to completely fill its container. If the sap.m.FlexBox is inserted into a Page, the property 'enableScrolling' of the Page needs to be set to 'false' for the FlexBox to fit the entire viewport.
When called with a value of null or undefined, the default value of the property will be restored.
Default value is false.
| {boolean} | bFitContainer | New value for property fitContainer |
| {sap.m.FlexBox} | Reference to this in order to allow method chaining |
height. The height of the sap.m.FlexBox. Note that when a percentage is given, for the height to work as expected, the height of the surrounding container must be defined.
When called with a value of null or undefined, the default value of the property will be restored.
Default value is .
| {sap.ui.core.CSSSize} | sHeight | New value for property height |
- Since:
- 1.9.1
| {sap.m.FlexBox} | Reference to this in order to allow method chaining |
justifyContent. Determines the layout behavior along the main axis.
When called with a value of null or undefined, the default value of the property will be restored.
Default value is Start.
| {sap.m.FlexJustifyContent} | sJustifyContent | New value for property justifyContent |
| {sap.m.FlexBox} | Reference to this in order to allow method chaining |
renderType. Determines whether the layout is rendered as a series of divs or as an unordered list (ul)
When called with a value of null or undefined, the default value of the property will be restored.
Default value is Div.
| {sap.m.FlexRendertype} | sRenderType | New value for property renderType |
| {sap.m.FlexBox} | Reference to this in order to allow method chaining |
width. The width of the sap.m.FlexBox. Note that when a percentage is given, for the width to work as expected, the width of the surrounding container must be defined.
When called with a value of null or undefined, the default value of the property will be restored.
Default value is .
| {sap.ui.core.CSSSize} | sWidth | New value for property width |
- Since:
- 1.9.1
| {sap.m.FlexBox} | Reference to this in order to allow method chaining |
wrap. Determines the wrapping behavior of the flex container. This property has no effect in older browsers, e.g. Android Native 4.3 and below.
When called with a value of null or undefined, the default value of the property will be restored.
Default value is NoWrap.
| {sap.m.FlexWrap} | sWrap | New value for property wrap |
- Since:
- 1.36.0
| {sap.m.FlexBox} | Reference to this in order to allow method chaining |