Label Component - Maple Help

Online Help

All Products    Maple    MapleSim

Home : Support : Online Help : Programming : Document Tools : Embedded Components : LabelComponent

Label Component


The label component defines a label in a Standard Maple worksheet or document. The label component can display a caption or an image.  


The label component is customized by setting options in Label Properties. To display Label Properties, right-click (Control-click for Macintosh) the embedded component and select Component Properties. Actions are associated with components using routines in the DocumentTools package.


The Name property is used to reference the label when using the routines from the DocumentTools package.

Component Palette Image

Label Properties


The following table describes the control and use of the label component options.


An x in the G column indicates that the option can be read, that is, retrieved by using the DocumentTools[GetProperty] tool.


An x in the S column indicates that the option can be written, that is, set by using the DocumentTools[SetProperty] tool.

Option                G  S  Option Type      
caption               x  x  string           
enabled               x  x  true or false    
image                    x  name or string   
pixelHeight           x  x  positive integer
pixelWidth            x  x  positive integer
tooltip               x  x  string           
useSpecifiedSize      x  x  true or false    

 useSpecifiedWidth     x  x  true or false     
visible               x  x  true or false    
visibleCharacterWidth x  x  positive integer




The text that appears in the label.  By default, the value is Label.




Whether the component is enabled. If enabled is set to false, the component is grayed out and any action associated with it cannot be initiated. By default, the value is true.




The image that appears on the label.




The height of the image in pixels.




The width of the image in pixels.




The text that appears when the user hovers the mouse over the label.




Whether the specified size of the image is used. By default, the value is false.




Whether the specified character width is used. By default, the value is false.




Specifies if the label is visible. By default, the value is true.




The number of characters that appear in the label. This option only applies when useSpecifiedWidth is set.

Label Component Examples


Note: To interact with the examples provided below, open this help page as a worksheet and then execute the worksheet.


This example launches Student[Calculus1][DiffTutor] and returns the derivative of the function to an embedded Mathematical Expression component.

To insert the components and set the caption for the label component:


Insert a Label component, a Button component, and a Mathematical Expression component using the Components palette. For information on displaying the Maple palettes, see the Show Palettes help page.


Right-click the Label component, and then select Component Properties.


In the Caption field, enter Differentiation Help, and then click OK.

To launch the differentiation tutor when you click on the button component:


Right-click the Button component, and then select Component Properties.


In the Caption field, enter Run Tutor, and then click OK.


Right-click (Control-click for Macintosh) on Run Tutor, and then select Edit Click Action.

This launches the Code Editor dialog with preset statements and additional information on how to program actions between embedded components.


Before the end use; statement in the dialog, enter the following commands:

a := Student[Calculus1][DiffTutor](sin(x)*cos(x));


Note: Ensure the component name (that is, MathContainer0) is correct.


From the File menu, select Save Code to accept all changes.


From the File menu, select Close Code Editor.

When you click on Run Tutor, the Student[Calculus][DiffTutor] dialog opens. From here you can solve a differentiation problem step-by-step. When you close the dialog, the result from the tutor is displayed in the math expression component.




You can verify the syntax of the embedded component action by executing the command in the worksheet.


DocumentTools[Do](%MathContainer0 = a);



See Also

ButtonComponent, CheckBoxComponent, ComboBoxComponent, DataTableComponent, DialComponent, DocumentTools, DocumentTools[Do], DocumentTools[GetProperty], DocumentTools[SetProperty], EmbeddedComponents, ListBoxComponent, MathExpressionComponent, MeterComponent, PlotComponent, RadioButtonComponent, RotaryGaugeComponent, SliderComponent, Student[Calculus1][DiffTutor], TextAreaComponent, ToggleButtonComponent, VideoPlayerComponent, VolumeGaugeComponent

Download Help Document

Was this information helpful?

Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam