Class sap.m.SliderModule: sap/m/Slider
A slider is a user interface control that enables the user to adjust values in a specified numerical range.
sClassName and enriches it with the information contained in oClassInfo.fnFunction to the change event of this sap.m.Slider.fnFunction to the liveChange event of this sap.m.Slider.fnFunction from the change event of this sap.m.Slider.fnFunction from the liveChange event of this sap.m.Slider.ariaLabelledBy.ariaLabelledBy.sap.m.Slider. 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
- Events
- change : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
- liveChange : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
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. |
| {sap.ui.base.Event} | oControlEvent | |
| {sap.ui.base.EventProvider} | oControlEvent.getSource | |
| {object} | oControlEvent.getParameters | |
| {float} | oControlEvent.getParameters.value | The current value of the slider after a change. |
| {sap.ui.base.Event} | oControlEvent | |
| {sap.ui.base.EventProvider} | oControlEvent.getSource | |
| {object} | oControlEvent.getParameters | |
| {float} | oControlEvent.getParameters.value | The current value of the slider after a live change. |
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 |
ariaLabelledBy. | {string|sap.ui.core.Control} | vAriaLabelledBy | the ariaLabelledBy to add; if empty, nothing is inserted |
- Since:
- 1.27.0
| {sap.m.Slider} | Reference to this in order to allow method chaining |
fnFunction to the change event of this sap.m.Slider. When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.m.Slider itself.
This event is triggered after the end user finishes interacting, if there is any change.
| {object} | oData? | An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
| {function} | fnFunction | The function to be called when the event occurs |
| {object} | oListener? | Context object to call the event handler with. Defaults to this sap.m.Slider itself |
| {sap.m.Slider} | Reference to this in order to allow method chaining |
fnFunction to the liveChange event of this sap.m.Slider. When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.m.Slider itself.
This event is triggered during the dragging period, each time the slider value changes.
| {object} | oData? | An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
| {function} | fnFunction | The function to be called when the event occurs |
| {object} | oListener? | Context object to call the event handler with. Defaults to this sap.m.Slider itself |
| {sap.m.Slider} | Reference to this in order to allow method chaining |
fnFunction from the change event of this sap.m.Slider. The passed function and listener object must match the ones used for event registration.
| {function} | fnFunction | The function to be called, when the event occurs |
| {object} | oListener | Context object on which the given function had to be called |
| {sap.m.Slider} | Reference to this in order to allow method chaining |
fnFunction from the liveChange event of this sap.m.Slider. The passed function and listener object must match the ones used for event registration.
| {function} | fnFunction | The function to be called, when the event occurs |
| {object} | oListener | Context object on which the given function had to be called |
| {sap.m.Slider} | Reference to this in order to allow method chaining |
change to attached listeners. Expects the following event parameters:
valueof typefloatThe current value of the slider after a change.
| {Map} | mArguments? | The arguments to pass along with the event |
| {sap.m.Slider} | Reference to this in order to allow method chaining |
liveChange to attached listeners. Expects the following event parameters:
valueof typefloatThe current value of the slider after a live change.
| {Map} | mArguments? | The arguments to pass along with the event |
| {sap.m.Slider} | Reference to this in order to allow method chaining |
ariaLabelledBy. - Since:
- 1.27.0
| {sap.ui.core.Control[]} |
enabled. Indicates whether the user can change the value.
Default value is true.
| {boolean} | Value of property enabled |
max. The maximum value.
Default value is 100.
| {float} | Value of property max |
min. The minimum value.
Default value is 0.
| {float} | Value of property min |
name. The name property to be used in the HTML code for the slider (e.g. for HTML forms that send data to the server via submit).
Default value is .
| {string} | Value of property name |
progress. Indicate whether a progress bar indicator is shown.
Default value is true.
| {boolean} | Value of property progress |
showHandleTooltip. Indicate whether the handle tooltip is shown.
Default value is true.
- Since:
- 1.31
| {boolean} | Value of property showHandleTooltip |
step. Define the amount of units to change the slider when adjusting by drag and drop.
Defines the size of the slider's selection intervals. (e.g. min = 0, max = 10, step = 5 would result in possible selection of the values 0, 5, 10).
The step must be positive, if a negative number is provided, the default value will be used instead. If the width of the slider converted to pixels is less than the range (max – min), the value will be rounded to multiples of the step size.
Default value is 1.
| {float} | Value of property step |
value. Define the value.
If the value is lower/higher than the allowed minimum/maximum, the value of the properties min/max are used instead.
Default value is 0.
| {float} | Value of property value |
width. Defines the width of the control.
Default value is 100%.
| {sap.ui.core.CSSSize} | Value of property width |
ariaLabelledBy. - Since:
- 1.27.0
| {sap.ui.core.Control[]} | An array of the removed elements (might be empty) |
ariaLabelledBy. | {int|string|sap.ui.core.Control} | vAriaLabelledBy | The ariaLabelledByto be removed or its index or ID |
- Since:
- 1.27.0
| {sap.ui.core.Control} | the removed ariaLabelledBy or null |
enabled. Indicates whether the user can change the value.
When called with a value of null or undefined, the default value of the property will be restored.
Default value is true.
| {boolean} | bEnabled | New value for property enabled |
| {sap.m.Slider} | Reference to this in order to allow method chaining |
max. The maximum value.
When called with a value of null or undefined, the default value of the property will be restored.
Default value is 100.
| {float} | fMax | New value for property max |
| {sap.m.Slider} | Reference to this in order to allow method chaining |
min. The minimum value.
When called with a value of null or undefined, the default value of the property will be restored.
Default value is 0.
| {float} | fMin | New value for property min |
| {sap.m.Slider} | Reference to this in order to allow method chaining |
name. The name property to be used in the HTML code for the slider (e.g. for HTML forms that send data to the server via submit).
When called with a value of null or undefined, the default value of the property will be restored.
Default value is .
| {string} | sName | New value for property name |
| {sap.m.Slider} | Reference to this in order to allow method chaining |
progress. Indicate whether a progress bar indicator is shown.
When called with a value of null or undefined, the default value of the property will be restored.
Default value is true.
| {boolean} | bProgress | New value for property progress |
| {sap.m.Slider} | Reference to this in order to allow method chaining |
showHandleTooltip. Indicate whether the handle tooltip is shown.
When called with a value of null or undefined, the default value of the property will be restored.
Default value is true.
| {boolean} | bShowHandleTooltip | New value for property showHandleTooltip |
- Since:
- 1.31
| {sap.m.Slider} | Reference to this in order to allow method chaining |
step. Define the amount of units to change the slider when adjusting by drag and drop.
Defines the size of the slider's selection intervals. (e.g. min = 0, max = 10, step = 5 would result in possible selection of the values 0, 5, 10).
The step must be positive, if a negative number is provided, the default value will be used instead. If the width of the slider converted to pixels is less than the range (max – min), the value will be rounded to multiples of the step size.
When called with a value of null or undefined, the default value of the property will be restored.
Default value is 1.
| {float} | fStep | New value for property step |
| {sap.m.Slider} | Reference to this in order to allow method chaining |
value. Default value is 0.
| {float} | fNewValue | new value for property value. |
| {sap.m.Slider} | this to allow method chaining. |
width. Defines the width of the control.
When called with a value of null or undefined, the default value of the property will be restored.
Default value is 100%.
| {sap.ui.core.CSSSize} | sWidth | New value for property width |
| {sap.m.Slider} | Reference to this in order to allow method chaining |
step with the given parameter. | {int} | iStep?, Default: 1 | The number of steps the slider goes down. |
| {sap.m.Slider} | this to allow method chaining. |
step with the given parameter. | {int} | iStep?, Default: 1 | The number of steps the slider goes up. |
| {sap.m.Slider} | this to allow method chaining. |