Rangeslider"

From Documentation
(19 intermediate revisions by 2 users not shown)
Line 4: Line 4:
  
 
*Demonstration:  
 
*Demonstration:  
*Java API: [http://www.zkoss.org/javadoc/latest/zk/org/zkoss/zkmax/zul/Rangeslider.html Rangeslider]  
+
*Java API: [http://www.zkoss.org/javadoc/latest/zk/org/zkoss/zkex/zul/Rangeslider.html Rangeslider]  
*JavaScript API: [http://www.zkoss.org/javadoc/latest/jsdoc/zkmax/slider/Rangeslider.html Rangeslider]  
+
*JavaScript API: [http://www.zkoss.org/javadoc/latest/jsdoc/zkex/slider/Rangeslider.html Rangeslider]  
*{{ZK EE}}
+
{{ZK PE}}
 +
since 9.0.0
  
 
= Employment/Purpose =
 
= Employment/Purpose =
  
A rangeslider component represents a slider with a range value. It can be used to let user select a start value and end value. A rangeslider accepts a range of value starting from 0 to certain maximum value. The default maximum value of rangeslider scale is 100. You could change the maximum allowed value by the max property. Notice that the value of max property is always larger than the value of min property.
+
A rangeslider component represents a slider with a start and an end value. A rangeslider accepts a range of value starting from 0 to a certain maximum value. The default maximum value of rangeslider is 100. You can change the maximum allowed value by setting the max property. Notice that the value of max property is always larger than the value of min property.
  
 
= Example =
 
= Example =
 
+
[[Image:ZKComRef_Rangeslider.png]]
 
<source lang="xml" >
 
<source lang="xml" >
<zk xmlns:ca="client/attribute">
+
<zk>
 
   <rangeslider startValue="10" endValue="90"/>
 
   <rangeslider startValue="10" endValue="90"/>
 +
  <separator />
 +
  <rangeslider orient="vertical" startValue="20" endValue="80" markScale="20" />
 
</zk>
 
</zk>
 
</source>
 
</source>
Line 29: Line 32:
  
 
== Marks ==
 
== Marks ==
Sets the marks information for displaying value marks.
+
Sets the marks information map for displaying value marks. (Default: null)
(Default: "20")
+
In this map, the key represents the number value of slider, and the value represents the displayed scale text.
If there is only a number value, for example: 20.
+
 
The value marks would be displayed every 20 start from the minimum value. (if min is 0, then display "0 20 40 ...")
+
== MarkScale ==
Another options for the marks can be specified as follows:
+
Sets the marks information for displaying value marks (Default: "20").  
<source lang="xml" ><rangeslider marks="10:10%, 20:20%, 50:50%, 80:80%" /></source>
+
 
It means that each value mark could be displayed in different text.
+
By default, the value marks will be displayed every 20 starting from the minimum value. (if min is 0, then it displays "0 20 40 ...")
 +
 
 +
 
 +
If the MarkScale is 0 and there is no Map information in Marks (see above), the marks will be empty.
 +
 
 +
[[Image:ZKComRef_RangesliderNoMarks.png]]
  
 
== Max ==
 
== Max ==
Rangeslider supports maximal position, which can be changed by the max property as follows.
+
Rangeslider supports maximal position, which can be changed by the max property.
 
(Default: 100)
 
(Default: 100)
  
 
== Min ==
 
== Min ==
Rangeslider supports minimal position, which can be changed by the min property as follows.
+
Rangeslider supports minimal position, which can be changed by the min property.
 
(Default: 0)
 
(Default: 0)
  
Line 50: Line 58:
  
 
== Step ==
 
== Step ==
By default, the rangeslider will scroll to the position continuously when an user drags it. If you prefer to scroll a discrete fixed amount on each step, you can set the amount of value of the step property.
+
By default, the rangeslider will scroll to the position continuously when a user drags it. If you prefer to scroll a discrete fixed amount at each step, you can set the amount of value using the step property.
  
 
== TooltipVisible ==
 
== TooltipVisible ==
The tooltip displays the value of slider buttons in rangeslider.
+
The tooltip displays the value of a slider button in the rangeslider.
If the tooltipvisible is true, the tooltips of the slider buttons would be always visible.
+
If the tooltipvisible is true, the tooltips of the slider buttons will always be visible.
 
(Default: false)
 
(Default: false)
  

Revision as of 03:09, 29 November 2019

Rangeslider

  • Available for ZK:
  • http://www.zkoss.org/product/zkhttp://www.zkoss.org/whyzk/zkeeVersion pe-ee.png
since 9.0.0

Employment/Purpose

A rangeslider component represents a slider with a start and an end value. A rangeslider accepts a range of value starting from 0 to a certain maximum value. The default maximum value of rangeslider is 100. You can change the maximum allowed value by setting the max property. Notice that the value of max property is always larger than the value of min property.

Example

ZKComRef Rangeslider.png

<zk>
  <rangeslider startValue="10" endValue="90"/>
  <separator />
  <rangeslider orient="vertical" startValue="20" endValue="80" markScale="20" />
</zk>

Properties

Disabled

If the rangeslider is disabled, then users can not drag the slider buttons.

Orient

Sets the orient either "horizontal" or "vertical" to display rangslider.

Marks

Sets the marks information map for displaying value marks. (Default: null) In this map, the key represents the number value of slider, and the value represents the displayed scale text.

MarkScale

Sets the marks information for displaying value marks (Default: "20").

By default, the value marks will be displayed every 20 starting from the minimum value. (if min is 0, then it displays "0 20 40 ...")


If the MarkScale is 0 and there is no Map information in Marks (see above), the marks will be empty.

ZKComRef RangesliderNoMarks.png

Max

Rangeslider supports maximal position, which can be changed by the max property. (Default: 100)

Min

Rangeslider supports minimal position, which can be changed by the min property. (Default: 0)

StartValue, EndValue

Represent the range value of Rangeslider. (Default: 0)

Step

By default, the rangeslider will scroll to the position continuously when a user drags it. If you prefer to scroll a discrete fixed amount at each step, you can set the amount of value using the step property.

TooltipVisible

The tooltip displays the value of a slider button in the rangeslider. If the tooltipvisible is true, the tooltips of the slider buttons will always be visible. (Default: false)

Supported Events

Name
Event Type
onRangeValueChange
Event: RangeValueChangeEvent

Denotes the range value of a component has been changed by the user.

Supported Children

*None

Use Cases

Version Description Example Location
     

Version History

Last Update : 2019/11/29


Version Date Content
9.0.0 November, 2019 Rangeslider was introduced.



Last Update : 2019/11/29

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.