Adding Explanatory Text to Menus

Designer: You can add explanatory text (such as a title, explanations of menu selections, or general instructions) inside the Designer. See the Designer User's Guide for more information.

Code: To add text to a menu (such as a title, explanations of menu selections, or general instructions), use the background text definition function, bg_txtdef():

BG_TXTPTR bg_txtdef(wn_rb, wn_cb, text_stp, att, fmp)
 
int wn_rb;
/* Beginning row of text string
*/
int wn_cb;
/* Beginning column of text string,
*/
 
/* use CENTER_TEXT to center text
*/
char *text_stp;
/* Text to display on menu form
*/
UCHAR att;
/* Video attribute to use to write text
*/
FORMPTR fmp;
/* Pointer to menu form to write text on
*/

Naming Tip: Functions that define background items begin with the abbreviation "bg_".

You should take into account the amount of text that you want to include in a menu form when defining the menu window. If you specify an AUTOSIZE menu window, the window will be sized to include any background text.

You should define the background text before the menu form is displayed on the screen. If you define background text after the menu has been displayed on the screen, you must call fm_updbg() to display the new background text.


Home Contents Previous Next