Colorpicker

An element that the user may use to select a color from. Mozilla renders this as a grid of colors. The user may select a color by clicking on one of the grid cells.

The colorpicker element implements the following interfaces:

nsIDOMXULControlElement  

Attributes:

disabled color onchange preference tabIndex
type

Properties and Methods:

color disabled tabIndex value

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
observes
ordinal
orient
pack
persist
popup
position
preference-editable
ref
removeelement
sortDirection
sortResource
sortResource2
statustext
style
template
tooltip
tooltiptext
top
uri
wait-cursor
width

disabled

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 a color is selected.

preference    Mozilla 1.8

Type: element id

Connects the colorpicker to a corresponding preference. This attribute only has any effect when used inside a prefwindow. The value of the preference will be updated to match the value property of the colorpicker.

tabIndex    Mozilla 1.8

Type: integer

Get and sets the value of the tabindex attribute.

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 and Methods:

Inherited from XUL Element:

align
allowEvents
blur
boxObject
boxObject.element
boxObject.getLookAndFeelMetric
boxObject.height
boxObject.screenX
boxObject.screenY
boxObject.width
boxObject.x
boxObject.y
builder
className
click
collapsed
contextMenu
controllers
database
datasources
dir
doCommand
flex
focus
getElementsByAttribute
height
hidden
id
left
maxHeight
maxWidth
menu
minHeight
minWidth
observes
ordinal
orient
pack
persist
ref
resource
statusText
style
tooltip
tooltipText
top
width

Inherited from Element:

addEventListener
appendChild
attributes
childNodes
cloneNode
dispatchEvent
firstChild
getAttribute
getAttributeNS
getAttributeNode
getAttributeNodeNS
getElementsByTagName
getElementsByTagNameNS
hasAttribute
hasAttributeNS
hasAttributes
hasChildNodes
insertBefore
isSupported
lastChild
localName
namespaceURI
nextSibling
nodeName
nodeType
nodeValue
normalize
ownerDocument
parentNode
prefix
previousSibling
removeAttribute
removeAttributeNS
removeAttributeNode
removeChild
removeEventListener
replaceChild
setAttribute
setAttributeNS
setAttributeNode
setAttributeNodeNS
tagName

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

Gets and sets the value of the disabled attribute.

tabIndex    Mozilla 1.8

Type: integer

Get and sets the value of the tabindex attribute.

value    Mozilla 1.8

Type: color string

Returns the currently selected color. This property may also be used to change the value of the color picker.


Copyright (C) 1999 - 2004 XulPlanet.com