Slider"

From Documentation
Line 81: Line 81:
 
| August 2010
 
| August 2010
 
| <javadoc method="setPageIncrement(int)">org.zkoss.zul.Slider</javadoc> is supported.
 
| <javadoc method="setPageIncrement(int)">org.zkoss.zul.Slider</javadoc> is supported.
 +
|-
 +
| 5.0.4
 +
| August 2010
 +
| Slider support for clicking to increment or decrement
 
|}
 
|}
 
  
 
{{ZKComponentReferencePageFooter}}
 
{{ZKComponentReferencePageFooter}}

Revision as of 21:53, 2 December 2010

Slider

Employment/Purpose

A slider component represents a slider with slid and knob. It can be used to let user specify a value by scrolling. A slider accepts a range of value starting from 0 to 100. You could change the maximum allowed value by the maxpos property.

Example

ZKComRef Slider.png

  <slider id="slider" orient="vertical"/>
  <slider curpos="1" maxpos="20"  />

Page Increment

By default, the slider will move to the position of the try on which an user clicks. If you prefer to move in a fixed amount (like the scrollbar does), you could specify the amount of value to move by use of Slider.setPageIncrement(int).

  <slider pageIncrement="10"/>

Supported Events

Name
Event Type
onScroll
Event: ScrollEvent

Denotes the content of a scrollable component has been scrolled by the user.

onScrolling
Event: ScrollEvent

Denotes that user is scrolling a scrollable component. Notice that the component's content (at the server) won't be changed until onScroll is received. Thus, you have to invoke the getPos method in the ScrollEvent class to retrieve the temporary position.

Supported Molds

Available molds of a component are defined in lang.xml embedded in zul.jar.

Name
Snapshot
default
Slider mold default.png
sphere
Slider mold sphere.png
scale
Slider mold scale.png

Supported Children

*None

Use Cases

Version Description Example Location
     

Version History

Last Update : 2010/12/02


Version Date Content
5.0.4 August 2010 Slider.setPageIncrement(int) is supported.
5.0.4 August 2010 Slider support for clicking to increment or decrement



Last Update : 2010/12/02

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