Skip to content
This repository has been archived by the owner on Oct 14, 2024. It is now read-only.

ColorPickerExtender

MikhailTymchukDX edited this page Apr 12, 2017 · 3 revisions

Demo Page

The ColorPicker extender allows you to display a popup color picker when focus is moved to an input element. You can attach the ColorPicker extender to any ASP.NET TextBox control.

Properties

Name Description
EnabledOnClient Specifies whether or not ColorPicker behavior is available for the current element.
OnClientColorSelectionChanged A JavaScript function that will be called when the colorSelectionChanged event is raised.
OnClientHidden A JavaScript function that will be called when the hidden event is raised.
OnClientHiding A JavaScript function that will be called when the hiding event is raised.
OnClientShowing A JavaScript function that will be called when the showing event is raised.
OnClientShown A JavaScript function that will be called when the shown event is raised.
PaletteStyle Indicates which color palette the color picker uses. The default is Default.
PopupButtonID The ID of a control to use to display the color-picker popup.
Remarks: If this value is not set, the color picker will pop up when the TextBox control represented by TargetControlID receives focus.
PopupPosition Indicates where the color picker popup should appear relative to the TextBox control that is being extended.
Remarks: Values can be BottomLeft, BottomRight, TopLeft, TopRight, Left, or Right. The default is BottomLeft.
SampleControlID The ID of a control to use to display the selected color.
Remarks: If this value is set and the color picker popup is open, the background color of the specified control displays a color over which that the mouse pointer is hovering. If this value is not set, the selected color is not displayed.
SelectedColor A color value that the ColorPicker extender is initialized with.

Client properties

Name Description
button The Sys.UI.DomElement object that represents a button to use to show the color picker.
enabled A Boolean value that specifies whether or not ColorPicker behavior is available for the current element.
paletteStyle The Sys.Extended.UI.PaletteStyle object that represents which color palette is used. The default is Default.
popupPosition The Sys.Extended.UI.PositionMode object that represents where the popup should be positioned relative to the target control. The default is BottomLeft.
sample The Sys.UI.DomElement object that represents an element to use to preview the color that is currently selected or over which a user is holding the mouse pointer.
selectedColor A string that contains a color value that is represented by the text box.

Client methods

Name Description
hide() Hides the color picker.
show() Shows the color picker.

Client events

Name Description
colorSelectionChanged Fires when color selection is changed.
hidden Fires after the control is hidden.
hiding Fires when the control is being hidden.
showing Fires when the control is being shown.
shown Fires after the control is shown.

Client properties

button

The Sys.UI.DomElement object that represents a button to use to show the color picker.

Remarks: This property is optional.

Getter name: get_button()
Setter name: set_button(value)

enabled

A Boolean value that specifies whether or not ColorPicker behavior is available for the current element.

Getter name: get_enabled()
Setter name: set_enabled(value)

paletteStyle

The Sys.Extended.UI.PaletteStyle object that represents which color palette is used. The default is Default.

Getter name: get_paletteStyle()
Setter name: set_paletteStyle(value)

popupPosition

The Sys.Extended.UI.PositionMode object that represents where the popup should be positioned relative to the target control. The default is BottomLeft.

Getter name: get_popupPosition()
Setter name: set_popupPosition(value)

sample

The Sys.UI.DomElement object that represents an element to use to preview the color that is currently selected or over which a user is holding the mouse pointer.

Remarks: This property is optional.

Getter name: get_sample()
Setter name: set_sample(value)

selectedColor

A string that contains a color value that is represented by the text box.

Getter name: get_selectedColor()
Setter name: set_selectedColor(value)

Client methods

hide()

Hides the color picker.

show()

Shows the color picker.

Client events

colorSelectionChanged

Fires when color selection is changed.

Add event handler method: add_colorSelectionChanged(handler)
Remove event handler method: remove_colorSelectionChanged(handler)
Raise event method: raise_colorSelectionChanged()

hidden

Fires after the control is hidden.

Add event handler method: add_hidden(handler)
Remove event handler method: remove_hidden(handler)
Raise event method: raise_hidden()

hiding

Fires when the control is being hidden.

Add event handler method: add_hiding(handler)
Remove event handler method: remove_hiding(handler)
Raise event method: raise_hiding()

showing

Fires when the control is being shown.

Add event handler method: add_showing(handler)
Remove event handler method: remove_showing(handler)
Raise event method: raise_showing()

shown

Fires after the control is shown.

Add event handler method: add_shown(handler)
Remove event handler method: remove_shown(handler)
Raise event method: raise_shown()

Clone this wiki locally