SLIDEVAR allows the user to choose a value (within a range) by dragging a slider. txt contains the name of the Constant or Game Input for gaming. A | separates the name from prompt information. If the justification field contains a V the slider is displayed Vertically. If the justification is empty or contains an H the slider is displayed horizontally. The minimum and maximum value for the variable are specified in the accelerator/range field.
SLIDEVAR,"low cost housing prog coeff",24,40,25,9,H,[0|.2]
Putting a percent sign % at the beginning of the range will cause Vensim to use scientific notation. You can specify a sensitivity for SLIDEVAR. This is the minimum increment in value that will be realized when the user drags the slider. Enter this as the third argument to acc as in:
SLIDEVAR,"low cost housing prog coeff",24,40,25,9,H,[0|.2|.01]
Here the slider would change values only by .01 increments (i.e. it could take on only 21 value). When the SLIDEVAR is configured in this manner the user can still type in any number.
You can also place labels on SLIDEVARs. To do this you should precede the range information with the letter L (upper or lower case both work). If you just have the L Vensim will create scales based on the range. You can replace these labels by custom labels if you follow the L by a vertical bar | as in:
SLIDEVAR,"Final Time",24,40,35,9,H,%L|Soon|Late|[2140|2200|.5]
will result in:
It is also possible to specify a broader range for the slider than the Constant or Game variable can be changed. This is done by following the min, max and increment with a slider min and slider as in:
SLIDEVAR,"Final Time",24,40,35,9,H,%L[2140|2200|.5|2100|2200]
Setting different bounds on the variable and slider can be useful when you have a number of sliders you would like to keep on the same scale.
NOTEThe fonts for the editable number and the labels are set separately. The font for the labels should follow the range information while the font for the editable text is in the justification field. Thus the control
SLIDEVAR,"Final Time",24,40,35,9,H||14|B,%L[2140|2200|.5|2100|2200]||6