The Array Input (

) is a predefined form object with an input table to enter array inputs (vector inputs). The
Array Input supports arrays as data sources. You can add an optional label, symbol, and unit. Enter the name of the Array Input object in the
Name field.
In the Length field, enter the length of the array as a positive integer (default: 3). The maximum length is 1000.
From the Show vector as list, choose
Table (the default) to show the array components as a table, or choose
Components to show each array component as a separate input field with a label.
In addition, the Settings window contains the following sections:
In this section you select the source for the array input. The section contains a tree with a filtered view of the tree in the Application Builder window. The nodes either represent some sort of data or have children that do. For an array input, the list contains array variables defined under
Declarations, for example. When you select a node that represents data, the
Use as Source toolbar button (

) below the tree becomes enabled. You can also 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 values list, select
From data source (the default) to use the value specified by the selected data source, or select
Custom values. Then in the associated table below, enter the initial values for the components in the array.
Use the Label position list to place a label. The options are
Above (the default),
Left, and
No label. For the two first options, you can enter the desired label in the
Label text field.
When the label position is above the table, you can include a symbol to the left of the table by selecting the Include symbol check box. You cannot see this setting when the label position is to the left of the table as it overlaps with the symbol position. Enter the symbol using LaTeX syntax in the
Symbol (LaTeX encoded) field.
As a final option, select the Include unit check box to add a unit symbol to the right of the table. To add a unit, choose a corresponding physical quantity from the
From physical quantity list or enter a valid unit expression in the
SI unit field under the list when its value is
None.
•
|
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 of the array input. Enter a width (in points) in the Width 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. The
Height field is unavailable because the height of the input field is determined by the software.
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 Inherit (the default) to inherit the text color from the setting in the Form node, or select one of the predefined colors, such as Black. Select Custom to choose a custom text color from the color palette that opens.
|
•
|
From the Background color list, select a color to use as the background in the array input: 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.
|
•
|
Select the Italic check box to use italics (an italic font).
|
Under State, you can control the initial state of the array input when users run the application. By default, the array input is visible and enabled. Clear the
Visible or
Enabled check box if you want to make the initial state so that the array input is hidden or unavailable. You can then make it visible or enable it using a method.
For certain types of form objects, you can specify a method to run when an event such as data entry occurs. The On data change list contains
None (the default) and any available methods. To add a local method for the event, click the
Create Local Method button (

) to the right of the
On data change list, or right-click the file import object. The selected method in the
On data change list then changes to
Local method. To open the local method in a method editor window, click the
Go to Source button (

). An empty
onDataChange editor window then opens, where you can define the local method. (This window opens automatically when you first create a local method this way.) Click the
Remove Local Method button (

) to delete the local method. Methods called from the array input object support a string argument with the new client file name selected by the user.
•
|
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.
|