Slider.MoveOnClick

Syntax

MoveOnClick: Boolean

Description

The MoveOnClick property determines if the slider will move on clicking the Slider component with the left mouse button.

Comments

Use JSON or the setMoveOnClick method to set the property value and the getMoveOnClick method to get the property value.

If the property is set to True, slider will move on clicking the left mouse button, otherwise it will not move.

The slider will move only when the Slider component has only one slider.

By default the property is set to False.

Example

To execute the example, the page must contain the Slider component named slider (see Example of Creating the Slider Component). Remove the slider with the index 0, enable slider movement on left click:

// Remove the slider with the index 1
slider.removeItemByIndex(1);
// Enable the slider movement on clicking the left mouse button
slider.setMoveOnClick(true);

Click on the component center with the left mouse button.

After executing the example slider with the index 1 is removed, slider with the index 0 is moved to center of the Slider component:

See also:

 Slider