User Tools

Site Tools


DzEnumSlider

An integer slider that displays a set of string values in place of numeric values.

More...

Inherits :

Properties

DAZ Script
Numbercount
Stringtext

Constructors

DAZ Script
DzEnumSlider ( DzWidget parent )

Methods

DAZ Script
NumberaddItem ( String label )
voidclear ()
StringgetItem ( Number index )
voidmoveItem ( Number from, Number to )
voidremoveItem ( Number index )
voidrenameItem ( Number index, String label )

Detailed Description

Provides a control that allows a user to adjust a bounded, enumerated, integer value. The slider is clamped by default, and automatically sets its min and max range according to the number of string values it contains.

Properties


Number : count

Holds the number of items on the slider. (Read Only)


String : text

Holds the text of the slider. (Read Only)

Constructors


DzEnumSlider( DzWidget parent )

Creates a new enumerated slider widget.

Parameter(s):

  • parent - The widget parent for the slider.

Methods


Number : addItem( String label )

Adds a string to the list of items, and adjusts the maximum value for the slider.

Parameter(s):

  • label - The string value to add to the list of items in the slider.

Return Value:

  • The index of the item - this is the numeric value of the slider that corresponds to the string value.

void : clear()

Clears the list of string values for this slider.


String : getItem( Number index )

Parameter(s):

  • index - The index of the item to get.

Return Value:

  • The string representing the item specified.

void : moveItem( Number from, Number to )

Moves an item from one position to another.

Parameter(s):

  • from - The index of the item to move. If out of range, this method has no effect.
  • to - The new index for the item. If out of range, from becomes the last item.

void : removeItem( Number index )

Removes the item at the specified position from the list.

Parameter(s):

  • index - The index of the item. If out of range, this method has no effect.

void : renameItem( Number index, String label )

Renames the item at the specified position.

Parameter(s):

  • index - The index of the item to rename. If out of range, this method has no effect.
  • label - The new value of the item at index.