spinbox
Module(s): vncanvas-base, vncanvas-form
Description: Creates a HTML form spinbox(number) element with corresponding label.
- Note: Use only on a 'form', not a 'cform'
- Instantiating form elements without using "form" is not recommended.
spinbox, {param} |
Creates a spinbox. Parameters are given as {param:value, param:value, ...} |
| Parameter | Attributes and Description |
|---|---|
|
name:"spinbox_label"
|
This sets the label and id of the spinbox.
|
|
min:number
|
Optional
This sets the minimum value for the spinbox.
|
|
max:number
|
Optional
This sets the maximum value for the spinbox.
|
|
step:number
|
Optional
This sets the increment value for the spinbox.
|
|
bind:"variable"
|
The corresponding variable to bind the
spinbox to. Incrementing/decrementing the spinbox updates
the bound variable. "variable" can be a config or user variable.
|
|
tip:"tool_tip_to_display"
|
Optional
The tooltip to display when mouse hovers
over its label.
|
The following spinbox is bound to a configuration variable named "audioVolume".
chapter = [
...
spinbox, {name:"Audio volume",
min:0,
max:1,
step:0.05,
bind:"audioVolume",
tip:"Adjust audio volume"},
...
];