Step 4: Adding Text

There are two ways of adding text to the screen:

Create a text control. The Winform facility enables you to treat text like other types of controls, such as buttons, grids, and fields. You can define a message or other text as a text control. Like other types of controls, you manipulate a text control using the Painter menus and function keys (not the Delete and Insert keys).

To create a text control, select Text from the Objects menu or press PF13. The cursor flashes where it was the last time you pressed Enter. You are prompted to move the cursor to where you want the text to begin.

After pressing Enter, the Create Text dialog box appears, and you can type the desired text in the entry field. You can include any characters you wish, with the exception of double quotation marks ("). When you are finished, you click PF4, and the text appears on the screen. If the text is wider than the window, scroll left and right by pressing PF10 and PF11.

Copy a text control. You can copy text controls from within the Painter. This feature is useful when you want several text controls to look similar to one another.

To copy a text control, select Copy from the Edit menu. Next, move your cursor to the control you want to copy. Then, move your cursor to where you want the copied control to be located. You can edit the control by pressing PF12 to change its attributes.

For this tutorial, you want to display a message telling application users how to use the Winform.

Try it now:

  1. Select Text from the Objects menu. Move the cursor to row 18, column 15 (using the terminal emulator's coordinates) and press Enter.

    A dialog box similar to the following opens.

  2. In Enter text:, type the following: Select country and car, then update old cost data.

  3. Press PF4 to indicate you are finished.

The screen should look similar to the following:

Once you have completed the application, users will be able to select a country and car by using buttons that you will add in Step 5: Adding Buttons and Triggers.


Information Builders