Step 7. Add Logic to the Hello Button Click Event
FRM015A - Getting Started with Forms Programming Part A
1. Add the highlighted code to the Click event for the Hello button (it adds the word 'Hello ' to the #STD_TEXT field):
#STD_TEXT:= #STD_TEXT + 'Hello '
The AutoComplete prompter shows up as you start to type. You can use it to select a command and the command's parameter values.
Note that there is a space between the word Hello and the closing quote.
Some Things to Note about Editing Code
- The editor is completely free format. The syntax will be checked as you enter the command. A red triangle beside a command indicates that a warning or error message can be displayed. To display the message, click on the red triangle.
- You can only enter one command per line.
- Your commands and their parameters can be in uppercase or lowercase.
- The definitions of the components (that is, buttons, fields and so on) on your form are stored at the start of your program as a series of DEFINE_COM (Define Component) commands. These commands can be hidden or displayed using the plus sign in front of them or using the editor settings.
- Normally, you will change the DEFINE_COM commands only by using the form layout or by altering the component's property sheet even though you can edit the DEFINE_COM statements.
- Comment lines start with an asterisk (*).
- A command line can have a comment in this format COMMAND /* comment */