insert a dial in a worksheet or document
Image of the Components Palette Item
Image of an Inserted Dial
Dial Component Example
The dial component performs an action or a series of actions to communicate with other embedded components when adjusting the needle in the dial, although assigning an action to a component is not required.
To perform an action when the dial, click the dial component, and then, from the Dial context panel, select Edit Value Changed Code to open the Code Editor dialog for the dial component. Enter the commands you want to perform in the Code Editor dialog.
You need to specify one or more embedded components that will display the output when adjusting the dial. For more information, see the Dial Component Example on this page.
The dial component is customized by setting options in the Dial context panel. To view the options in the context panel, select the dial component. Actions are associated with components using routines in the DocumentTools package.
The Name property is used to reference the dial when using the routines from the DocumentTools package.
The Show Axis Label and Show Axis Tick Marks properties displays an axis label and axis tick marks on the dial respectively when selected.
The Continuous Update On Drag property performs a continuous action on one or more components when selected. The Maple commands in the Edit Value Changed Code property must be programmed as such to perform this continuous action.
The following table describes the control and use of the dial component options.
An x in the Get column indicates that the option can be read, that is, retrieved by using the DocumentTools[GetProperty] tool.
An x in the Set column indicates that the option can be written, that is, set by using the DocumentTools[SetProperty] tool.
true or false
name or string
integer or floating-point number
positive integer or positive floating-point number
The range from 0 to 360 degrees of the dial. By default, the value is 270.
Indicates whether the component should update continuously during drag operations. By default, the value is false.
Whether the component is enabled. If enabled is set to false, any action associated with this component cannot be initiated. By default, the value is true.
The image that appears on the dial.
The lower bound on the dial. By default, the value is 0.
The interval between the major ticks on the dial. By default, the value is 20.
The interval between the minor ticks on the dial. By default, the value is 10.
The height of the dial image in pixels.
The width of the dial image in pixels.
Indicates if labels are shown. By default, the value is false.
Indicates if tick marks are shown. By default, the value is true.
The start angle from 0 to 360 degrees for the dial. By default, the value is 45.
The text that appears when the user hovers the mouse over the component.
The type of the component. This returns "Dial".
The upper bound on the dial. By default, the value is 100.
The current position of the dial marker. By default, the value is 0.
Specifies if the dial is visible. By default, the value is true.
Note: To interact with the examples provided below, open this help page as a worksheet and then execute the worksheet.
This example shows how you can alter a Meter component using a Dial component.
Insert a Dial component and a Meter component using the Components palette. For information on displaying the Maple palettes, see the Show Palettes help page.
Click the Dial component to display the Dial context panel.
Adjust the size of the Dial by entering 180 for both Width in Pixels and Height in Pixels.
Note: To use the entire area of the dial, change Start angle to 0 and Angle range to 360 degrees.
Click Change and then Clear to remove the default blue dial. To select a different image, click Select.
Click OK to save changes.
Click the Dial component, and then select Edit Value Changed Code.
This launches the Code Editor.
Before the end use; statement in the dialog, enter the following command:
SetProperty("Meter0", value, GetProperty("Dial0", value ));
Note: Ensure the names of the components are correct (that is, that they match the Name fields for their components).
or from the File menu, select Save Code to accept all changes.
From the File menu, select Close Code Editor.
When you change the value of the Dial component by turning it, the value on the Meter component changes accordingly.
You can verify the syntax of the embedded component action by executing the command in the worksheet.
Download Help Document
What kind of issue would you like to report? (Optional)