gxp.form.ColorField
¶
-
class
gxp.form.
ColorField
(config)¶ A text field that colors its own background based on the input value. The value may be any one of the 16 W3C supported CSS color names (http://www.w3.org/TR/css3-color/). The value can also be an arbitrary RGB hex value prefixed by a ‘#’ (e.g. ‘#FFCC66’).
Config Options¶
Configuration properties in addition to those listed for Ext.form.TextField.
-
defaultBackground
The default background color if the symbolizer has no fillColor set. Defaults to #ffffff.
Public Properties¶
Public properties in addition to those listed for Ext.form.TextField.
-
ColorField.
cssColors
¶ Object
Properties are supported CSS color names. Values are RGB hex strings (prefixed with ‘#’).
Public Methods¶
Public methods in addition to those listed for Ext.form.TextField.
-
ColorField.
getHexValue
()¶ Returns: String
The RGB hex string for the field’s value (prefixed with ‘#’).As a compliment to the field’s
getValue
method, this method always returns the RGB hex string representation of the current value in the field (given a named color or a hex string).
-
ColorField.
getValue
()¶ Returns: String
The RGB hex string for the field’s value (prefixed with ‘#’).This method always returns the RGB hex string representation of the current value in the field (given a named color or a hex string), except for the case when the value has not been changed.
-
ColorField.
setValue
()¶ Parameters: value – Object
Sets the value of the field. If the value matches one of the well known colors in
cssColors
, a human readable value will be displayed instead of the hex code.