joliclic
An extended kh-scale, twinned by a xul:textbox
of type "number
".
Any change of the value of the kh-scale is passed to the textbox, and vice versa.
Any attributes of a xul:scale are inherited.
Scroll events are handled by the kh-scale and the textbox.
An event of type "khchange" is dispatched when the value of the element change. If this value have been setted with the setValue method, and true as its "silent" parameter, event.detail will contains the value of the KH_FLAG_SILENT property (0).
<kh-xscale scalewidth="120" scaleheight="24" colors="#f0f;#ff0"/>
<kh-xscale orient="vertical" scalewidth="30" scaleheight="140" colors="green;#ff0;#0ff;red"/>
live examples:
type: integer
The width of the kh-scale. Default = 100;
type: integer
The height of the kh-scale. Default = 20.
type: string
The initial colors of the background. List of valid SVG colors, separated by the character ";
". Any valid SVG color can be used (#rgb, #rrggbb, rgb(r, g, b), SVG name). A linear gradient will be applied between each colors. Default = "#fff;#fff".
To change later these colors, use the colors
property, or the setColors()
method.
type: integer
Get and set the value of the element, i.e. the value of the kh-scale and of the textbox
type: string
Get and set the colors of the background of the scale. List of valid SVG colors separated by the character ";
". A linear gradient will be applied between each colors.
readonly
type: element
The kh-scale element.
readonly
type: element
The textbox element.
readonly
type: integer
This flag is used when the setValue() have been called. If true is passed as the silent parameter, the khchange event will be fired with this value as event.detail.
Set the value property of the element.
If silent parameter is passed as true, the khchange event will be dispatched with the value of the KH_FLAG_SILENT property for the event.detail.
Get the colors
of the background, a list of SVG colors separated by the ";
" character.
Set the colors of the background. You must pass a list of SVG colors separated by the ";
" character. A gradient will be applied between each colors.
Khromaxul - version: 0.3alpha - 2009-07-30