Class \Prado\Web\UI\WebControls\TColorPicker
TColorPicker displays a text box for color input purpose. Next to the textbox there's a button filled with the current chosen color. Users can write a color name directly in the text box as an hex triplet (also known as HTML notation, eg: #FF00FF). Alternatively, if the ShowColorPicker property is enabled (it is by default), users can click the button to have a color picker UI appear. A color chan be chosen directly by clicking on the color picker.
TColorPicker has three different color picker UI Modes:
Simple - Grid with 12 simple colors.
Basic - Grid with the most common 70 colors. This is the default mode.
Full - Full-featured color picker.
The CssClass property can be used to override the CSS class name for the color picker panel. The ColorStyle property sets the packages styles available. E.g. default.
If the Mode property is set to Full, the color picker panel will display an "Ok" and "Cancel" buttons. You can customize the button labels setting the OKButtonText and CancelButtonText properties.
Class hierarchy
- \Prado\Web\UI\WebControls\TColorPicker
- \Prado\Web\UI\WebControls\TTextBox implements IPostBackDataHandler, IValidatable, IDataRenderer
- \Prado\Web\UI\WebControls\TWebControl implements IStyleable
- \Prado\Web\UI\TControl implements IRenderable, IBindable
- \Prado\TApplicationComponent
- \Prado\TComponent
Since: 3.0
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
renderEndTag(THtmlWriter $writer) : mixed
Renders additional body content.
This method overrides parent implementation by adding additional color picker button. |
public
|
|
public
|
|
public
|
|
public
|
|
public
|
setShowColorPicker(bool $value) : mixed
Sets whether to pop up the color picker when the button is clicked.
|
protected
|
|
protected
|
|
protected
|
getClientClassName() : string
Gets the name of the javascript class responsible for performing postback for this control.
This method overrides the parent implementation. |
protected
|
|
protected
|
public
mixed
|
SCRIPT_PATH
|
'colorpicker'
|