User Interface

A memo field is treated very much like any other item on a data form. By default, when the form is first displayed, the contents of the data variable associated with the memo field are converted and displayed in the memo field. The memo field is initially displayed so that the upper-left corner of the memo buffer (0, 0) is at the beginning (0, 0) of the memo field window.

The user can enter and exit the memo field by moving to another field using the Next Item key (KEY_F8), Previous Item key (KEY_F7), or other field movement keys. When the user is not in the memo field, the field is displayed using LFLDINACT (a default value). When the user is in the memo field, the field is displayed using LFLDACT (also a default value). If the user leaves the memo field and then returns, the cursor is placed at the same position it was when the memo field was last exited.

When the user enters the memo field for the first time, the physical cursor is placed at coordinate (0, 0) in the memo window. Keyboard processing is controlled by the memo event table (Memo field:MEMOETP). If the memo field window and memo buffer have only one row, the tickertape memo event table (Tickertape memo field:TTMEMOETP) is used instead. As with all system input processing, the system event table (SYSETP) is searched first. If the event code is not found in the system event table, the form event table is searched (FMETP). If the event code is not found in the form event table, the memo editor event table in use is searched, either MEMOETP or TTMEMOETP.

To the user, all operations are relative to the current position of the physical cursor. Thus, pressing the Enter key (which inserts a newline character at the current cursor position when using the default key assignments) at the end of a row starts a new row, but pressing the Enter key in the middle of a row splits the row.

Full editing and scrolling capabilities, including toggling between Insert and Overstrike mode, are provided.

Word wrap and auto reflow are always on (they cannot be turned off). If the user inserts a word or character in the middle of a row, the remaining text in the paragraph reflows. Words wrap to the next blank line.

There are two major differences between the user interface for tickertape memo fields and the user interface for regular memo fields. First, since tickertape memo fields cannot scroll vertically, the Up and Down arrow keys (KEY_UP and KEY_DN) can be used to move from the tickertape memo to other items on the form. Second, you can attach a choice list to a tickertape memo field, but not to a regular memo field.

You can modify the memo editing event tables by changing the event code assignments. You can also write your own event functions and install them in the event table to provide the user with additional capabilities.

See the "Event Tables" section in the Function Reference for a complete listing of event code assignments used for memo fields. To learn more about modifying event tables and writing event functions, see Chapter 38, "Writing Event Functions," and Chapter 39, "Installing Event Functions and Modifying Event Tables." In addition, it is helpful to know how the form editor works and what functions you can call to assist you in moving between fields and accessing field and form information. See Chapter 29, "How Form and Menu Processing Works," for this information.

Naming Tip: All event functions for editing memo fields begin with the abbreviation "ke_".


Home Contents Previous Next