Class sap.ui.layout.FixFlexModule: sap/ui/layout/FixFlex
The FixFlex control builds the container for a layout with a fixed and a flexible part. The flexible container adapts its size to the fix container. The fix container can hold any number of controls, while the flexible container can hold only one.
In order for the FixFlex to stretch properly, the parent element, in which the control is placed, needs to have a specified height or needs to have an absolute position.
Warning: Avoid nesting FixFlex in other flexbox based layout controls (FixFlex, FlexBox, Hbox, Vbox). Otherwise contents may be not accessible or multiple scrollbars can appear.
Note: If the child control of the flex or the fix container has width/height bigger than the container itself, the child control will be cropped in the view. If minFlexSize is set, then a scrollbar is shown in the flexible part, depending on the vertical property.
Since: 1.25.0.
sClassName
and enriches it with the information contained in oClassInfo
.sap.ui.core.Control
in the aggregation fixContent
. 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
- vertical : boolean (default: true)
- fixFirst : boolean (default: true)
- fixContentSize : sap.ui.core.CSSSize (default: auto)
- minFlexSize : int (default: 0)
- Aggregations
- fixContent : sap.ui.core.Control[]
- flexContent : sap.ui.core.Control
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 |
fixContent
. {sap.ui.core.Control} | oFixContent | the fixContent to add; if empty, nothing is inserted |
{sap.ui.layout.FixFlex} | Reference to this in order to allow method chaining |
fixContent
. {sap.ui.layout.FixFlex} | Reference to this in order to allow method chaining |
flexContent
. {sap.ui.layout.FixFlex} | Reference to this in order to allow method chaining |
fixContent
. Controls in the fixed part of the layout.
{sap.ui.core.Control[]} |
fixContentSize
. Determines the height (if the vertical property is "true") or the width (if the vertical property is "false") of the fixed area. If left at the default value "auto", the fixed-size area will be as large as its content. In this case the content cannot use percentage sizes.
Default value is auto
.
{sap.ui.core.CSSSize} | Value of property fixContentSize |
fixFirst
. Determines whether the fixed-size area should be on the beginning/top ( if the value is "true") or beginning/bottom ( if the value is "false").
Default value is true
.
{boolean} | Value of property fixFirst |
flexContent
. Control in the stretching part of the layout.
{sap.ui.core.Control} |
minFlexSize
. Enables scrolling inside the flexible part. The given size is calculated in "px". If the child control in the flexible part is larger then the available flexible size on the screen and if the available size for the flexible part is smaller or equal to the minFlexSize value, the scroll will be for the entire FixFlex control.
Default value is 0
.
- Since:
- 1.29
{int} | Value of property minFlexSize |
vertical
. Determines the direction of the layout of child elements. True for vertical and false for horizontal layout.
Default value is true
.
{boolean} | Value of property vertical |
sap.ui.core.Control
in the aggregation fixContent
. and returns its index if found or -1 otherwise. {sap.ui.core.Control} | oFixContent | The fixContent whose index is looked for |
{int} | The index of the provided control in the aggregation if found, or -1 otherwise |
fixContent
. {sap.ui.core.Control} | oFixContent | the fixContent to insert; if empty, nothing is inserted |
{int} | iIndex | the 0 -based index the fixContent should be inserted at; for a negative value of iIndex , the fixContent is inserted at position 0; for a value greater than the current size of the aggregation, the fixContent is inserted at the last position |
{sap.ui.layout.FixFlex} | Reference to this in order to allow method chaining |
fixContent
. Additionally, it unregisters them from the hosting UIArea.
{sap.ui.core.Control[]} | An array of the removed elements (might be empty) |
fixContent
. {int|string|sap.ui.core.Control} | vFixContent | The fixContentto remove or its index or id |
{sap.ui.core.Control} | The removed fixContent or null |
fixContentSize
. Determines the height (if the vertical property is "true") or the width (if the vertical property is "false") of the fixed area. If left at the default value "auto", the fixed-size area will be as large as its content. In this case the content cannot use percentage sizes.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is auto
.
{sap.ui.core.CSSSize} | sFixContentSize | New value for property fixContentSize |
{sap.ui.layout.FixFlex} | Reference to this in order to allow method chaining |
fixFirst
. Determines whether the fixed-size area should be on the beginning/top ( if the value is "true") or beginning/bottom ( if the value is "false").
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is true
.
{boolean} | bFixFirst | New value for property fixFirst |
{sap.ui.layout.FixFlex} | Reference to this in order to allow method chaining |
flexContent
. {sap.ui.core.Control} | oFlexContent | The flexContent to set |
{sap.ui.layout.FixFlex} | Reference to this in order to allow method chaining |
minFlexSize
. Enables scrolling inside the flexible part. The given size is calculated in "px". If the child control in the flexible part is larger then the available flexible size on the screen and if the available size for the flexible part is smaller or equal to the minFlexSize value, the scroll will be for the entire FixFlex control.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 0
.
{int} | iMinFlexSize | New value for property minFlexSize |
- Since:
- 1.29
{sap.ui.layout.FixFlex} | Reference to this in order to allow method chaining |
vertical
. Determines the direction of the layout of child elements. True for vertical and false for horizontal layout.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is true
.
{boolean} | bVertical | New value for property vertical |
{sap.ui.layout.FixFlex} | Reference to this in order to allow method chaining |