287
edits
m (→Number Box) |
(add wraparound attribute) |
||
| Line 19: | Line 19: | ||
The widget supports all the attributes and properties of the textbox, and implements nsIDOMXULTextBoxElement. | The widget supports all the attributes and properties of the textbox, and implements nsIDOMXULTextBoxElement. | ||
All attributes shown above have a corresponding property. The decimalPlaces | All attributes shown above have a corresponding property. The decimalPlaces property corrsponds to the decimalplaces atribute. The wrapAround property corresponds to the wraparound attribute. | ||
; min : The minimum value the number in the field may be. The value cannot be decreased below this value. The default value is 0. | ; min : The minimum value the number in the field may be. The value cannot be decreased below this value. The default value is 0. | ||
| Line 26: | Line 26: | ||
; increment : The amount the number in the field is incremented or decremented when the arrows are pressed. The default value is 1. | ; increment : The amount the number in the field is incremented or decremented when the arrows are pressed. The default value is 1. | ||
; decimalplaces : the number of decmal places to display. The default value is 0, which doesn't show decimal places. | ; decimalplaces : the number of decmal places to display. The default value is 0, which doesn't show decimal places. | ||
; wraparound : if true, the values will wrap around when reachng the minimum or maximum values. Both the min and max must not be Infinity. | |||
The special value Infinity may be used for either the min or max attributes to indicate no minimum or maximum value, which generally means the lowest or highest value possible that can be supported. | The special value Infinity may be used for either the min or max attributes to indicate no minimum or maximum value, which generally means the lowest or highest value possible that can be supported. | ||
| Line 31: | Line 32: | ||
Negative values are also supported for the min, value and max attributes. | Negative values are also supported for the min, value and max attributes. | ||
Only the characters 0-9 may be displayed in the field. If the min attribute is less than 0, the minus sign (-) may also be entered. If the decimalplaces attribute is greater than 0, the locale dependant decimal point symbol may also be entered | Only the characters 0-9 may be displayed in the field. If the min attribute is less than 0, the minus sign (-) may also be entered. If the decimalplaces attribute is greater than 0, the locale dependant decimal point symbol may also be entered. | ||
Methods: | Methods: | ||
edits