The class provides a rotary knob - similar to a potentiometer. With the rotary knob you can generate numerical values (type integer) in a certain definition range [ Zmin | Zmax ].
Figure 17.11.1: Gambas rotary knob
In contrast, a rotary knob by Daniel Fuchs looks much fancier. This one not only has a neat rotary knob, but also a scale that you can label freely:
Figure 17.11.2: Rotary knob with scale (potentiometer class)
Properties of the Dial component are described in the following table:
|MinValue||Integer||1||Sets or returns the minimum value generated in the Dial component.|
|MaxValue||Integer||100||Sets the maximum value that is generated in the Dial component or returns this value.|
|Step||Integer||1||Changes the value of the generated integer (→ Dial.Value) by the value of Step when you press a cursor key as long as the Dial component has the focus.|
|PageStep||Integer||10||Changes the value of the generated integer (→ Dial.Value) by the value of PageStep when you press the Page_Up or Page_Down key as long as the Dial component has the focus. Use the Pos1 and End keys to reach the preset values for .MinValue and .MaxValue. A repeat function is built in.|
|Value||Integer||-||Sets the knob value or returns the generated integer.|
|Mark||Boolean||False||The value True specifies that a dash scale (without labels!) is displayed or returns the current scale mode.|
|Wrap||Boolean||False||The value True specifies that the pointer wraps to the minimum value after reaching the maximum value or returns the current wrap mode.|
Table 184.108.40.206: Dial properties
The Dial component has only one specific event:
In Chapter 17.10.2 a project is presented that converts the generated values of a rotary knob into real numbers (type Float) and displays them in the components LCDNumber as well as LCDLabel.