Designing a Form consists of the following steps:
|•||Placing an object from the Form Object Palette in the Form design.|
|•||Assigning values for the properties of individual Form Objects.|
The Form Object Palette contains all the objects that are available for designing Forms and looks something like the screenshot below. Registered ActiveX controls can be added to the Form Object Palette by right-clicking the pane and selecting the Add ActiveX Control command
To insert an object from the Form Object Palette click the object you want in the palette, then click at the location in the Form where you wish to insert the object. The object will be placed at this location. In many cases you will need to supply some properties of the object via the Properties and Events pane. You can drag the object to other locations as well as resize it. Further, a number of editing commands, such as centering and stacking objects, can be accessed via the context menu of the selected Form object.
Some Form objects, such as Timer, are not added to the Form but are created as Tray Components in a tray at the bottom of the Main Window. You can select the object in the tray and set properties and event handlers for the object via the Properties and Events pane. For an example of how Tray Components are handled, see Form usage and commands.
Some of the most commonly used objects are described below:
|Label: Adds text fields such as captions or field descriptions.|
|Button: Adds a button. It is possible to assign bitmaps as background images for these buttons.|
|Check Box: Adds a check box, which enables Yes/No type selections.|
|Combo Box: Adds a combo box, which allows the user to select an option from a drop-down menu.|
|List Box: Adds a list box, which displays a list of items for selection.|
|TextBox: Enables the user to enter a single line of text.|
|Rich TextBox: Enables the user to enter multiple lines of text.|
To create an object in the Form, first select the required object in the Form Object Palette and then click the location in the Form where you want to insert it. After the object has been inserted, you can resize it as well as drag it to another location in the Form.
When an object is selected in the design, you can specify its properties in the Properties and Events pane. In the toolbar of the Properties and Events pane, click the Properties icon to display a list of the object's properties.
For example, in the screenshot below, the Label object with the text Start Date has been selected in the design. In the Properties and Events pane, the name of the object (which is the name that is to be used to identify the object in code, Label1 in the screenshot below) is given in the Design category of properties; in this case, the name of the object is Label1.
The text of the label (which is what appears in the Form) must be entered as the value of the Text property in the Appearance category of properties.
To assign other object properties, enter values for them in the Properties and Events pane.
Testing a Form
You can test a form in the Scripting Editor by right-clicking it in the Project Overview pane and selecting the Test Form Command.
© 2018 Altova GmbH