PHP 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.
Show file
Open project: pradosoft/prado
Public Methods
Protected Methods
Method Details
createClientSide()
protected method
protected createClientSide ( ) : TColorPickerClientSide |
return |
TColorPickerClientSide |
javascript validator event options. |
getAssetUrl()
protected method
getCancelButtonText()
public method
getClientClassName()
protected method
This method overrides the parent implementation.
getClientSide()
public method
public getClientSide ( ) : TColorPickerClientSide |
return |
TColorPickerClientSide |
javascript event options. |
getColorPickerStyle()
public method
public getMode ( ) : TColorPickerMode |
return |
TColorPickerMode |
current color picker UI mode. Defaults to TColorPickerMode::Basic. |
getOKButtonText()
public method
getPostBackOptions()
protected method
Get javascript color picker options.
getShowColorPicker()
public method
onPreRender()
public method
Publish the color picker Css asset files.
publishColorPickerAssets()
protected method
Publish the color picker assets.
renderEndTag()
public method
This method overrides parent implementation by adding
additional color picker button.
setCancelButtonText()
public method
setColorPickerStyle()
public method
setOKButtonText()
public method
setShowColorPicker()
public method
Sets whether to pop up the color picker when the button is clicked.