pp108 : Colorpicker

Colorpicker

The Colorpicker control adds a color palette to the XForm. You can add only one Colorpicker control to an XForm. This control is derived from the AJAX Toolkit library - Colorpicker. For details about the control's behavior and functionality, see Colorpicker.

Properties, Events, and Methods of the Control

The properties, events, and methods associated with the Colorpicker control define its behavior. You can set them either through the control's property sheet or programmatically using the APIs. For details, see Colorpicker.

The following XForms-related properties, events, and methods are available for the control:

Table 1. List of Properties

Design-time property

Runtime property

Description

ID

id

Sets the string that identifies the control on an XForm. If not specified, a unique ID is automatically generated.

Class Name

className

Sets or retrieves the class name applied on the control.

Table 2. List of Events

Event

Description

oncolorchange

Fires when a color is changed in the Colorpicker.

Table 3. List of Methods

Method

Description

addListener(sEventName, fpFunction)

This method registers a function to an event, such that the function gets called when the event is fired on the control.

disable()

This method disables the control on which it is invoked.

enable()

This method enables the control on which it is invoked.

hide()

This method hides controls and all associated child controls.

isEnabled()

This method retrieves the value that denotes whether the control is enabled or not.

removeListener(sEventName, fpFunction)

This method unregisters a function from an event, such that the function stops getting called when the event is fired on the control.

show()

This method makes the control and its child controls visible.