Slider.ShowLabels

Syntax

ShowLabels: Boolean;

Description

The ShowLabels property determines if labels are displayed in the component.

Comments

Property value can be set only from JSON.

The property is set to True (default) if labels are shown in the component, and False if the labels are not displayed.

Example

To execute the example, create an HTML page and perform the following operations:

1. Add links to the PP.css and PP.js files.

2. Within the <body> tag place a block with the ID "slider':

<div id="slider"></div>

3. Next within the <body> tag add a script that creates a control enabling the user to select value by moving sliders without showing labels:

<script type="text/javascript">
var slider = new PP.Ui.Slider({
    ParentNode: document.getElementById("slider"), // Parent container
    // Sliders
    Items: [{
        Value: 0.25,
        PPType: "SliderItem",
        Id: "SliderItem1"
    }, {
        Value: 0.75,
        PPType: "SliderItem",
        Id: "SliderItem2"
    }],
    Orientation: PP.Orientation.Horizontal, // Component orientation
    Ticks: ["2001", "2002", "2003"], // Labels
    ShowLabels: false, // Labels will not be displayed                         
    Width: 500 // Component width
});
</script>

After executing the example the HTML page contains a control that enables the user to select value by moving sliders and without showing labels:

See also:

Slider