HP 3000 Manuals

Creating Screen Items [ HP ALLBASE/4GL Developer Reference Manual Vol. 1 ] MPE/iX 5.0 Documentation


HP ALLBASE/4GL Developer Reference Manual Vol. 1

Creating Screen Items 

The procedure for creating screen fields or items depends on the type of
field or item, and the type of screen.  The following subsections
describe the procedure for creating new fields or items on a screen.
Later subsections describe the procedures for copying, moving or deleting
fields or items on a screen.

Literals 

The procedure for creating text literals is the same for all types of
screens.

To create a literal on a screen, move the cursor to the starting point
for the literal and press Return.  You are then prompted to enter the
text.  Type in the text for the literal and press Return to terminate the
literal.

To change an existing literal, move the cursor to a position on the
literal and press Return.  You will be prompted to modify the text.  You
can do this by typing over it, or by using the terminal edit keys to
insert or delete characters.  Press Return to terminate your
modifications.

System Items 

The procedure for creating a system item is the same for all types of
screens.

To create a system item on the screen, move the cursor to the starting
point for the item and then press the  System Item  function key in the
Main Keys function key set.  The painter creates two input fields on the
screen to allow you to enter the prefix for the system item, and the name
of the item.

The prefixes and the corresponding items are shown below.

 Prefix  Item 

   D     Date

   *     Communication area

   M     Master title

   A     Application title

   N     Numeric constant

   C     Alphanumeric constant

   V     Variable

   P     Scratch-pad field

   U     Calculated item

The prefix field will contain one of the system item prefixes.  You can
accept the displayed prefix by pressing Return, or you can type over the
prefix.  By pressing the  Next Type  or  Previous Type  function keys you
can obtain a display of the available types of system items.

For items other than the date, the painter prompts you to enter the item
name.  You can reference scratch-pad fields by name or number.

Pressing the  Restore Original  function key restores an existing system
item to its original condition if you have started changing the item, but
have not completed the change.

You cannot use synonyms to specify communication area fields as system
items.  You must always use the standard communication area field names.

Action Items 

Only menus can have action items.  To create an action item, move the
cursor to the starting point for the item text.  Press the  Action  
function key in the Main Keys function key set.  The painter prompts you
to enter the prefix for the action type.  (By pressing the  Next Type  
and  Previous Type  function keys, you can obtain a display of the
available action type prefixes.)  Enter the action type prefix and press
Return.  The painter then prompts you to enter the name of the action
item.  Enter the name and press Return.

The painter displays the name of the item and creates a title on the
screen at the cursor position.  You can type over the displayed item name
to enter the text for the menu item.  Press Return to terminate the text
entry.

The name displayed by the painter is the text from the short description
field on the header screen for menus, functions, processes, and reports.
By choosing the text you enter in the description field on these header
screens carefully, you can avoid the need to type over the menu item text
on the screen.

To change the text of an action item, move the cursor to a position on
the literal and press Return.  You will be prompted to modify the text.
You can do this by typing over it, or by using the terminal edit keys to
insert or delete characters.  Press Return to terminate your
modifications.

To change the action associated with an existing action item, move the
cursor to the item and press the  Action  function key.  You can now
change the action type prefix, action name, and screen text for the item.

Input Fields and Output Fields 

Only data screens and windows can have input and output fields.  When you
create an input or output field, the painter assigns some default
attributes to the field.  HP ALLBASE/4GL displays these attributes
automatically on the screen field details screen for the appropriate
field.

To create an input or output field, move the cursor to the starting point
for the field and press the  Input Field  or  Output Field  function key
in the Main Keys function key set.  To define the field, you can do any
of the following:

   *   Enter a number representing the length of the field in characters.
       The field details default to:  required field, alphanumeric, and
       left justified.  You can change these attributes on the field
       details screen. 

   *   Enter a dictionary field specification name.  The painter
       retrieves the field specification from the dictionary and creates
       a field of the correct length.

Using Dictionary Fields.     

If you use a dictionary field specification name to define the length of
the field, the painter retrieves the details of the field from the
dictionary and assigns these attributes to the screen field.  HP
ALLBASE/4GL automatically writes these details into the correct fields on
the fields details screen.  You cannot change these attributes unless you
delete the dictionary field specification name on the screen field
details screen.

If you define a screen field using a dictionary field specification name,
any subsequent changes to the field specification in the dictionary or
the field details screen are automatically reflected in the screen image.

Converting Fields.     

You can convert an input field to an output field, or convert an output
field to an input field.

To convert a field from one type to the other, move the cursor to the
field and press the function key for the type of field you want to
convert the screen field to.  The painter then asks you if you want to
change the item type.  Press Y and then press Return to confirm the
change, or press N and then press Return to cancel the change.

Special Text Items 

The procedure for creating special text items is the same for all types
of screens.

To create a special text item, move the cursor to the starting point for
the item and press the  Special Text  function key in the Main Keys 
function key set.  The painter responds by displaying the special text
function keys.

[]
The special text function keys are toggle keys that turn the selected mode on or off. When the mode corresponding to a key is on, the painter displays an asterisk in screen text for the key. Select the highlighting you require and then press Return. You can now enter the text of the special text item. Press Return to terminate the text entry. Using Colors. You can define the color of a special text item for display on color terminals. To set the color of a special text item, press the Color Keys function key. The painter responds by displaying the color keys. Press the key corresponding to the color you want. The selected color is shown by an asterisk in the function key label for the color. (This selection defaults to white.) You can assign color attributes to a special text item even if you're working on a monochrome terminal. If you're working on a color terminal, the special text item will appear in the selected color.
NOTE Use blue carefully. Blue appears very dark on some color terminal screens, and can be hard to read. Use cyan (light blue) in preference.
Most color terminals are not capable of supporting color and half-brightness for the same item. If you do specify both color and half-brightness for the same item, the color attribute takes precedence on color terminals. Monochrome terminals ignore the color attributes. Editing Special Text Items. You can change the text of a special text item by typing over the existing text. To change the display highlighting of a special text item, move the cursor to the item, and press the Special Text function key. The painter responds by displaying the special text function keys. You can change the highlighting of the item by making a new selection from the function keys. Press Return when you have selected the highlighting you want. Converting Text Items. The screen painter allows you to convert a screen literal to a special text item. To convert a screen literal, move the cursor to a position on the literal and press the Special Text function key. The painter displays the message Convert normal text to special text? To convert the text, enter Y. The painter responds by displaying the special text function keys. Select the highlighting you want, and then press Return. The painter converts the screen literal to a special text item. You cannot convert a special text item to a normal screen literal directly. If you want to convert a special text item to a different type of screen item, delete the special text item and then reenter it as the item type you want. Line Drawing Character Set. On terminals that support the line drawing character set, you can use these characters for any special text item. To use the line drawing character set, press the Line Drawing function key after you have selected the special text function key. You can use the other display highlighting function (inverse video, blinking display, etc) with the line drawing characters. In the line drawing character set, the normal keyboard characters are replaced by the characters shown in the figure below. Line draw keyboard overlay here If you display a line drawing special text item on a terminal that doesn't support the line drawing character set, HP ALLBASE/4GL substitutes suitable standard characters for the line drawing characters.


MPE/iX 5.0 Documentation