Slider objects allow a numerical value to be displayed and modified with a slider or knob.
Start by dragging a slider button object from the Object Library to the form. Then enter the name of of the field or variable that will be linked to the slider (in this example, myValue). Set the minimum and maximum values, and the slider is ready to use.
Slider objects have about a dozen options.
This option specifies the data that is to be modified by the slider. You can either type in the name of a field or variable, or you can choose a field name from the pop-up menu (on the right). Panorama will also auto-complete field names as you type.
Note: If you specify a variable that has not already been created with a procedure, Panorama will automatically create a global, fileglobal or windowglobal variable with this name the first time the form is displayed. The type of variable created depends on the Form Preferences.
The pop-up menu switches between linear and circular styles.
The linear style can be either horizontal or vertical. There is no option for this, the orientation will automatically switch depending on the height/width ratio of the object.
Sliders may be one of three fixed heights: Regular, Small and Mini. These are the only sizes available – see Cocoa Objects for more detail about the reasons for this limitation.
This option disables the slider. When the slider is disabled it is dimmed and it can’t be clicked on.
Of course there is no point in a slider that is permanently disabled. So normally you would enable/disable a slider with a procedure. See {Push Button Objects for an explanation of how a procedure can enable/disable an object.
The Minimum and Maximum values set the range of the slider, in this case, from zero to 100.
You may want the values to jump in increments greater than 1.
The slider values don’t have to be integer values. Here is a slider that goes from 0 to 1, in increments of 1/100.
A Text Editor Object has been added so that you can see the value change as the slider thumb is moved.
Normally the field or variable associated with the slider is updated continuously as you drag, and if the object has a procedure, the code is triggered repeatedly as the slider thumb moves. To disabled continuous updates, uncheck the Update Value While Dragging option. With this option turned off, the value isn’t updated (and the code isn’t triggered) until the mouse button is released.
If you add tick marks, the shape of the slider changes to something that looks like home plate, and tick marks are displayed.
You can choose whether the slider can stop only on tick marks, or at any point.
The Construct>Fields and Variables dialog can automatically construct an item with a slider. To do this, set a maximum numeric value for the item (you can also set a minimum value). In this example, the slider can be used to adjust the quantity from 0 to 12.
The slider appears to the right of the text editor object (and the stepper, if there is one).
To learn more about this dialog, see Automatic Form Construction.
See Also
History
Version | Status | Notes |
10.0 | New | New in this version. |