The Text (

) form object is a predefined form for a text field with default text. It can either be static text that provides some information, or it can editable so that users can add notes or comments, for example. Enter the name of the Text object in the
Name field.
Select the Editable check box to make it possible for users to edit and add text. By default the text is static.
The Wrap text check box is selected by default. Click to clear it to disable wrapping of the text. A scroll bar appears if the text does not fit in its defined dimensions.
The Settings window contains the following sections:
In this section you define a source for the text object. The section contains a tree with a filtered view of the trees in the Application Builder and
Model Builder windows. The nodes either represent some sort of data or have children that do. You can extend the list of available data nodes by clicking the
Switch to Model Builder and Activate Model Data Access button (

) in the
Source section header, which takes you to the Model Builder, and then selecting a node in the
Model Builder branch whose data you want to access. With this button active, the
Settings window of the selected node displays a
Select Data Source check box (a green square) next to the settings that you can include. Click to select the check box to include that data as an available source node for text objects.
If the Editable check box is cleared so that the text is read-only, you can choose to use one of the following information nodes, which you find under the main
Model node and under each
Study node, as the source.
•
|
The Expected Computation Time node (  ) under Model>Information (  ): The expected computation time is a value that the application developer can enter in the Expected field in the Root node’s Settings window.
|
•
|
The Last Computation Time node (  ) under Model>Information: This node shows the last measured computation time for the last computed study.
|
•
|
The Last Computation Time node (  ) under each Model>Study>Information: This node shows the last measured computation time for that study.
|
When you select a node that represents data, the Use as Source toolbar button (

) below the tree becomes enabled. You can right-click the node and choose
Use as Source. You can also click the
Create button (

) in the
Source section header to create a new variable declaration and use it as the source. A
Create and Use Variable dialog box opens, so that you can select the data type of the source (if applicable), its name, and its initial value. The name cannot be in conflict with any existing variable declaration. Click the
Edit Node toolbar button (

) below the tree to move to the corresponding node. If necessary, the program switches to the Model Builder.
From the Initial value list, choose
From data source (the default) to use the text from the source. Alternatively, choose
Custom value to add a text to display in the
Value text field below.
•
|
From the Horizontal alignment list, choose Left, Center, Right, or Fill, which automatically expands the form object to fill the cell in the horizontal or vertical direction (where applicable).
|
•
|
From the Vertical alignment list, choose Middle, Top, Bottom, or Fill, which automatically expands the form object to fill the cell in the horizontal or vertical direction (where applicable).
|
The need to specify the alignment is most obvious when working in the grid mode, as it controls how the form object is aligned in its grid cell. Aligning the form object can be useful in the sketch mode too, and you can then use the alignment tools on the Arrange menu in the
Form toolbar’s
Sketch section. When running the application in any client other than the Windows client, the form objects may not be positioned exactly as seen in the form windows. This is because the form objects may have a different size in other clients, giving them a slightly different positioning. Specifying the alignment ensures that the form objects are aligned as you want them to be in all clients.
You can also specify the width and height of the text input. Enter a width (in points) in the Width field and a height (in points) in the
Height field. If you have chosen
Fill from the
Horizontal alignment list, you can instead specify a
Minimum width. Choose
Automatic to compute the minimum width automatically (typically this means a minimum size of 0), or choose
Manual to specify a minimum width in the text field underneath. If you have chosen
Fill from the
Vertical alignment list, you can instead specify a
Minimum height. Choose
Automatic to compute the minimum height automatically (typically this means a minimum size of 0), or choose
Manual to specify a minimum height in the text field underneath.
Additionally, in the sketch mode, you can specify the form object’s absolute position using the Position x and
Position y fields. In the grid mode, you can position the object in the grid and see the grid position as the
Row,
Column,
Row span, and
Column span values.
Under Cell margin (in grid mode only), you can control the margins around the form object. By default, the margins are taken from the parent form. From the
Cell margin list, choose:
•
|
None, to use no margin around the form object.
|
•
|
Custom, to specify the margins for the form object in the Horizontal and Vertical text fields.
|
•
|
From the Text color list, select a color to use for the text: Inherit (the default; the form object then uses the setting from the Form it is located in), any of the predefined basic colors, or Custom, which makes it possible to select a custom color from a color palette that opens.
|
•
|
From the Background color list, select a color to use as the background for the text: Transparent (the default), any of the predefined basic colors, or Custom, which makes it possible to select a custom color from a color palette that opens.
|
•
|
From the Text alignment list, select an alignment for the text: Left (the default), Center, or Right.
|
•
|
Select the Italic check box to use italics (an italic font).
|
Under State, you can control the initial state of the text object when users run the application. By default, the text object is visible and enabled. Clear the
Visible or
Enabled check box if you want to make the initial state so that the text object is hidden or unavailable. You can then make it visible or enable it using a method.
You can add a code method that the application runs when the text changes. The event is triggered after the new data value is stored in the data source. The On data change list contains
None (the default) and any available methods. To add a local method for this event, click the
Create Local Method button (

) or right-click the text object. The selected method in the
On data change list then changes to
Local method. (The editor window opens automatically when you first create a method this way.) To open the local method in an editor window, click the
Go to Source button (

). An empty
onDataChange editor window then opens, where you can define the local method. Click the
Remove Local Method button (

) to delete the local method.
•
|
If the On data change list is set to a method, Ctrl+Alt-click opens that method’s editor window.
|
•
|
If the On data change list is set to None, Ctrl+Alt-click creates a local method if needed, sets the list to Local method, and opens the local method’s editor window.
|