A view that displays a numerical value and allows to modify it by typing the value in, and incrementing or decrementing it using the keyboard, or mouse.
Using the keyboard, the value will change on each arrow key press by the amount defined by -step.
Mouse scrolling is performed by pressing a mouse button inside the view and dragging the mouse vertically. The value will change according to the mouse cursor movement, in steps defined by -scroll_step.
By default, holding down the Shift, Ctrl, or Alt key while incrementing or decrementing the value will multiply the steps by 100, 10, or 0.1 respectively, though you can customize this by setting -shift_scale, -ctrl_scale, or -alt_scale. Scrolling can be enabled or disabled by modifying the -scroll variable.
Numerical value between 0 and 1.
value |
A Float. |
Text to be displayed instead of the numerical value. Setting -value after this will display the value again.
string |
A String. |
If -setBoth is true, setting this variable also sets -string to the argument interpreted as String.
obj |
Any object, typically one which makes sense to display as a string, such as a Float. |
The lowest numerical value allowed. Trying to set a lower value will clip it to this.
aFloat |
A Float. |
The highest numerical value allowed. Trying to set a higher value will clip it to this.
aFloat |
A Float. |
The minimum amount of decimal places displayed. If the value can be completely described with less decimal places, zeros will be appended until reaching this.
decimals |
An Integer. |
The maximum amount of decimal places displayed. The value will always be rounded to this amount of decimals.
decimals |
An Integer. |
The alignment of the displayed value. See Alignment for possible values.
The color used to display the value before it is ever changed by user interaction.
color |
A Color. |
The color used to display the value after is has been typed in.
aColor |
A Color. |
The color used to display the value while it is being typed in.
aColor |
A Color. |
The amount by which the value will changed when -increment or -decrement is called, or when related keys are pressed.
aFloat |
A Float. |
The amount by which the value will changed when scrolled using the mouse.
aFloat |
A Float. |
The factor by which -step or -scroll_step is multiplied when incrementing or decrementing the value using keyboard or mouse while the Shift key is pressed.
aFloat |
A Float. |
The factor by which -step or -scroll_step is multiplied when incrementing or decrementing the value using keyboard or mouse while the Ctrl key is pressed.
aFloat |
A Float. |
The factor by which -step or -scroll_step is multiplied when incrementing or decrementing the value using keyboard or mouse while the Alt key is pressed.
aFloat |
A Float. |
The action object evaluated whenever the user changes the value by interacting with the view.
Any key representing a character that can make part of a floating point number representation will initiated the editing of the value. Pressing Return (or Enter) will finish the editing and store the value typed in as a Float.
Aside from that, this method implements the default effects of key presses as follows:
Key | Effect |
up arrow | increment |
down arrow | decrement |
right arrow | increment |
left arrow | decrement |
The -value.
True if the current drag data is a number.
Sets -valueAction to the current drag data.
Change frequency of a playing synth by step using arrow keys: