colorpicker

Table of contents

  1. 1. Examples
  2. 2. Attributes
  3. 3. Properties
  4. 4. Methods
  5. 5. Related
  6. 6. Bugs
Table of contents
  1. 1. Examples
  2. 2. Attributes
  3. 3. Properties
  4. 4. Methods
  5. 5. Related
  6. 6. Bugs
« XUL Reference home    [ Examples | Attributes | Properties | Methods | Related ]

A palette of colors from which a user may select by clicking on one of the grid cells.

Attributes
disabled , color , onchange , preference , tabindex , type
Properties
accessibleType , color , disabled , open , tabIndex , value

Examples

Image:XUL_REF_rgb.gif

<colorpicker/>

Attributes

Inherited from XUL element
align , allowevents , allownegativeassertions , class , coalesceduplicatearcs , collapsed , container , containment , context , contextmenu , datasources , dir , empty , equalsize , flags , flex , height , hidden , id , insertafter , insertbefore , left , maxheight , maxwidth , menu , minheight , minwidth , mousethrough , noinitialfocus , observes , ordinal , orient , pack , persist , popup , position , preference-editable , querytype , ref , removeelement , sortDirection , sortResource , sortResource2 , statustext , style , template , tooltip , tooltiptext , top , uri , wait-cursor , width

disabled
Type: boolean
Indicates whether the element is disabled or not. If this element is set to true the element is disabled. Disabled elements are usually drawn with grayed-out text. If the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire.
Visible controls have a disabled property which, except for menus and menuitems, is normally preferred to use of the attribute, as it may need to update additional state.
color
Type: color string
The currently selected color. This is modified when the user selects a color. You can assign a string of the form #RRGGBB to this property to change the selected color.
onchange
Type: script code
The code in the onchange attribute is called when the value of the element is changed.
preference
Type: id
Connects the element to a corresponding preference . This attribute only has any effect when used inside a prefwindow . More information is available in the Preferences System article.
tabindex
Type: integer
The tab order of the element. The tab order is the order in which the focus is moved when the user presses the "tab" key. Elements with a higher tabindex are later in the tab sequence.
type
Type: string
If this attribute is not present, the colorpicker is displayed inside the window. If this is set to the text button, the colorpicker is displayed as a button. When the user clicks the button, a popup appears for the user to select a color.

Properties

Inherited Properties
align , attributes, allowEvents , baseURI, boxObject , builder , childElementCount, childNodes, children, className , clientHeight, clientLeft, clientTop, clientWidth, collapsed , contextMenu , controllers , database , datasources , dir , firstChild, firstElementChild, flex , height , hidden , id , lastChild, lastElementChild, left , localName, maxHeight , maxWidth , menu , minHeight , minWidth , namespaceURI, nextElementSibling, nextSibling, nodeName, nodeType, nodeValue, observes , ordinal , orient , ownerDocument, pack , parentNode, persist , prefix, previousElementSibling, previousSibling, ref , resource , scrollHeight, scrollLeft, scrollTop, scrollWidth, statusText , style , tagName, textContent, tooltip , tooltipText , top , width

accessibleType
Type: integer
A value indicating the type of accessibility object for the element.
color
Type: color string
The currently selected color. This is modified when the user selects a color. You can assign a string of the form #RRGGBB to this property to change the selected color.
disabled
Type: boolean
Gets and sets the value of the disabled attribute.
open
Type: boolean
Returns true if the popup for a button-type colorpicker is open. Set this property to true to open the popup or false to close the popup.
tabIndex
Type: integer
Gets and sets the value of the tabindex attribute.
value property gets and sets color attribute

Related

Interfaces
nsIDOMXULControlElement

Bugs

The onchange Event only fires if Attribute type is set to "button". You may use onclick when you are working with a plain colorpicker and need the currently selected color for example to display in a <textbox>.

Tags (2)

Edit tags

Attachments (0)

 

Attach file