(Optional) Configure Tick Marks and Text Labels
You have created a rotator command control and want to add tick marks and labels to the command control. The procedure below is only one example of how tick marks and labels can be added to a rotator command element.
NOTE: The example below, is based on the example (values) used in the Configuring the Rotator Command Control Properties topic. As you create Lines (tick marks), Text boxes (value labels), and Groups (Line and Text box) for the various points on the rotational angle, it is recommended to add a brief Description in the element’s General properties section.
- To calculate the tick mark angles:
- Multiply the command control Rotation Angle (120, in our example) by the Ticks Frequency (10, in our example).
- Divide the result by the Maximum (100) minus the Minimum (0), In this example, the result is12. This value represents the angle distance between each tick mark.
- To create a Group that represents the tick mark and the text box for the value that is aligned with angle 0. In this case the value is 50.
- From the Elements group, click the Line element, and then draw a tick mark directly under the point of your thumb. Make sure the Thumb is at the angle 0 position. If the thumb is not in the angle position, you can reposition the Thumb in runtime mode.
- From the Element group, click Text, and draw a text box directly under the line on the canvas. And from the Format group, click Align Vertically and then click Align Horizontally to center the text.
- In the Properties view (Text Properties) in the Text field, type in the value. In this case, 50.
- From the Element Tree, select the Line and the Text you just created, right-click and from the Group context menu, select Group.
- (Optional) From the Properties view (Group Properties), select General. In the Description field, enter the value 50 Tick Mark.
- In the Properties view (Group Properties), set the Layout > Angle Center X and Angle Center Y so that the Angle Center is the same as the center of the rotator. Once you have the Angle Center on the canvas you can move it around.
- With the Group still selected in the Element Tree, navigate to the Evaluation Editor and do the following:
- From the Property drop-down menu, select Angle.
- From the Type drop-down menu, select Simple.
- In the Expression field, type 0.
- Repeat Steps 2 through 8 to create the Groups for the value of 0 (the minimum value) and 100 (the maximum value) of the rotator. Note the following difference for the Angle evaluation Value:
- 0 – In the Evaluator Editor, set the Value to -60.
- 100 – In the Evaluator Editor, set the Value to 60.
- To create the tick marks for the values in-between 0, 50, and 100, do the following:
- From the Element Tree, expand a Group, and then select and right-click the Line element. Select Copy and then click the canvas, and then press CTRL+V.
- Drag the Line over the existing tick marks.
- Select Layout > Angle Center X and Angle Center Y and set them to the center of the rotator, as with the Groups.
- In the Evaluation Editor, set the Angle evaluation (Simple) depending on which rotator value you are working on. Note the following difference for the Angle evaluation: Line 10 (Angle = -48); Line 20 (-36); Line 30 (Angle = -24); Line 40 (Angle = -12); Line 60 (Angle = 12); Line 70 (Angle = 24); Line 80 (Angle = 36); Line 90 (Angle = 48).
- Click Save.
- If you created a symbol and you want to designate it as the default command symbol for an object type proceed to Designating and Adding a Default Command Symbol to a Graphic.