The slider allows you to easily control a numeric parameter and change its value on the fly with the mouse cursor.

An example of using a slider in a TechEditor report:

Customizing the Slider object

How to add a slider

To add a new slider to your document, use the Slider command on the Automation > Common Objects toolbar:

How to configure the slider

The slider options window looks like this:

The Variable group of options defines the variable and its format:

  • Variable name — the name of the variable (correct identifier that corresponds to the MathSIV© syntax);
  • Value format — variable value format;
  • LaTeX — format for displaying a variable in LaTeX;

The Range group of options defines the range of values that the variable can take:

  • Minimum — minimum value of the variable;
  • Maximum — maximum value of the variable;
  • Step — step of variable values;

The slider works with only one variable.

Using the Slider object

After you customize the slider and click OK, a new object is added to the document:

 

Here, “x” is the name of the variable, and “0” is its current value. By moving the slider with the mouse cursor or keyboard arrows, you can change the value of the variable in real time.

Tip. If TechEditor's auto-calculate option is enabled (by default), the document will be updated automatically. If auto-calculations are disabled, press F5.

After you set the desired value for a variable, you can close the slider window. The value of the variable is saved in the document. You can reopen the slider window by double-clicking on the text element.

How to change the slider options

To change a variable's name, value range, or other slider options, right-click and choose Options:

How to change the slider orientation

The slider can be displayed vertically or horizontally. You can change this through the context menu options (see the figure above), or simply by resizing the window. If the width of the slider is less than the height, the slider is displayed vertically, otherwise it is displayed horizontally.

How to add units of measurement

The slider can work not only with numbers but also with physical quantities. To do this, just enter the required units in the Value format field, separated by a space:

The result of adding units of measurement:

Now the variable “x” will be included in the mathematical model of the document as a physical quantity with the dimension “length”.