Click Script on the Data Source tab in the Text Object Properties dialog box.
Click
.
A WYSIWYG Text Editor opens.
Enter the script that you want to apply to the object.
Guidelines for the script
The Compilation and Execution of the Object script starts and ends in function Main,
Sub Main functions are mandatory.
All the references to the object inside the script use MyObject.
Review:
Text object script properties. |
|
Text object script constants. |
|
Text object script date and time formats. |
|
Text object form level script functions and return types. |
Note: Menu options and toolbar buttons provide the same functionality as the same items in the CIMPLICITY Program Editor.
Do one of the following to compile the script.
Click the
button .Click File>Compile on the WYSIWYG Form Editor menu bar.
The script is compiled. Broadcast reports errors or informs you that the script compiled successfully.
Close the WYSIWYG Form Editor.
A message asks you if you want to save the script to the object.
Click
.The script displays as read-only text in the Script box.
Note: You can also click on the Data Source tab to compile the script.
Click Static.
Enter a brief description of your selection in the text box.
Click
.(Optional) Revise the font, border and position specifications to accommodate the text requirements.
Note: This can be done during any stage of the form design.
Click
.Result: The static text entry displays in the editable form. When the form is broadcast, the dynamic selection will replace this text.
Sample Script
Sub Main
Dim strValue as String
strValue = Form.ItemID
MyObject.TextValue = strValue
End Sub
Step 5.3. Select a data source for the text object. |