Creating Controls
You can use Drag&Drop to create controls with or without a reference to the data model.
To create or depict information stored in the XML document or one of its properties (such as the title or text of a news item) create controls with a reference to the data model.
To display static objects such as the heading 'Current News' using a list, or a company logo in a form, create controls without a reference to the data model. You enter the values to be displayed in the properties of the controls in question.
Dragging an element from the data model and dropping it onto the form using the primary mouse button
When you pull elements of the data model onto a form using the primary mouse button, you create the control that you last clicked in the menu bar.
If the combination of data type and control does not make sense (for example, Boolean and a line control), the system displays a context menu from which you can choose another control.
If you have not yet clicked on a control, the system creates the following objects by default:
· In the creation form: Input fields with a reference to the data model, and labels before them.
· In the display and list forms: Label controls with a reference to the data model.
If you want to create other objects, use Drag&Drop with the secondary mouse button. You can choose the objects that you want to create from a context menu. You can create the following objects.
Drag&Drop Options
Option |
Description |
Label |
Creates a label control without a reference to the data model. The name of the element is used as the caption. This option allows you to create field labels with static text.
|
Label with Reference |
Creates a label control without a reference to the element of the data model. This option allows you to create output fields for text saved in an XML document in display or list forms.
|
Label and Control |
Creates the control last clicked in the function bar with reference to the data model, and the label before it. This option allows you to create input fields with field labels in creation forms.
|
Control |
Creates the control last clicked in the function bar with reference to the data model. This option allows you to create checkboxes that you just selected by clicking on them in the function bar in creation forms.
|
You can change the default setting for Drag&Drop with the primary mouse button. To do so, click on a form and choose an option in the Drag&Drop property of the form. For information on the available options, see the table Drag&Drop Options above.
Dragging a control from the function bar and dropping it onto the form
When you pull a control from the function bar onto a form, you create a control without a reference to the data model.
This allows you to create static objects that are identical in all news items. Some examples:
· A label control for the title Current News Items above a list of news items
· An image control for a company logo that you want to display in the creation form
· A pushbutton or link for executing a command in the creation form