4D v13.4Indicators |
||
|
4D v13.4
Indicators
Indicators
Progress indicators (also called "thermometers"), rulers, and dials are objects that display a value graphically. The three objects work in the same way; they differ only in their appearance. We refer to these three objects as indicators. You can use indicators either to display or set values. For example, if a thermometer is given a value by a method, it displays the value. If the user drags the indicator point, the value changes. The value can be used in another object such as a field or an enterable or non-enterable object. Progress indicator / Dial / Ruler 4D provides several types of indicators which consist of three main types and their variants. To find out how to select a specific type of indicator, refer to the "Defining indicator types" section below. Main type: Progress indicator (thermometer) The progress bar is the default progress indicator. You can display horizontal or vertical progress bars. This is determined by the shape of the object that you draw. Main type: Progress indicator (thermometer) (MacOS) (Windows)This type of progress indicator displays a continuous animation. “Barber shop” thermometers are generally used to indicate to the user that the program is in the process of carrying out a long operation. When this variant is selected, the options of the "Scale" theme are hidden. When the form is executed, the object is not animated. You manage the animation by passing a value to its associated variable:
Note: “Barber shop” thermometers only work when the appearance is set to System or Printing. Main type: Progress indicator (thermometer) This circular indicator also displays a continuous animation. You use this type of object to indicate that an operation such as establishing a network connection or a performing a calculation is underway. When this variant is selected, the options of the "Scale" theme are hidden. When the form is executed, the object is not animated. You manage the animation by passing a value to its associated variable:
Main type: Ruler The ruler is a standard interface object used to set or get values using a cursor moved along its graduations. You can assign its associated variable to an enterable area (field or variable) to store or modify the current value of the object. Main type: Ruler Stepper associated with vStep variable. This standard object lets the user scroll through numeric values, durations (times) or dates by predefined steps by clicking on the arrow buttons. You can assign the variable associated with the object to an enterable area (field or variable) to store or modify the current value of the object. A stepper can be associated directly with a number, time or date variable.
Note: For the stepper to work with a time or date variable, it is imperative to set its type in the Property list AND to declare it explicitly via the C_TIME or C_DATE command. Main type: Dial This type of indicator displays data in semi-circular form. Dials, progress indicators and rulers are available using the button of the Form editor object bar. In addition, "Progress indicator" (Thermometer) and "Ruler" object types accept different variants.
In addition to the standard positioning and appearance settings, you can set some other specific properties for indicators: minimum value, maximum value, units for the tick marks, the minimum steps permitted by the indicator as well as display options. Several specific properties are set in the “Scale” theme of the Property List: This property theme is displayed for Progress bar, Ruler, Numeric stepper and Dial type indicators. The properties that are available also depend on the indicator type. Here is a description of each property:
When an indicator object is selected, there is an additional property in the “Action” theme of the Property List: Execute Object Method. When this option is checked, the object method is executed with the On Data Change event at the same moment the user changes the value of the indicator. By default, the method is executed after the modification. The variable associated with the indicator controls the display. You place values into, or use values from, the indicator using methods. For example, a method for a field or enterable object could be used to control a thermometer: vTherm:=[Employees]Salary This method assigns the value of the Salary field to the vTherm variable. This method would be attached to the Salary field. Conversely, you could use the indicator to control the value in a field. The user drags the indicator to set the value. In this case the method becomes: [Employees]Salary:=vTherm The method assigns the value of the indicator to the Salary field. As the user drags the indicator, the value in the Salary field changes. |
PROPERTIES
Product: 4D |