Adding Text to a Data Form

Designer: Background text can be added to your form in the Designer. See the Designer User's Guide for more information.

Code: Field prompt text is most conveniently placed on the form as part of a call to fld_def(). To add other text, such as a title or general instructions, to a form, use the background text definition function, bg_txtdef():

BG_TEXTPTR bg_txtdef(wn_rb, wn_cb, stp, att, dfmp)
 
int wn_rb;
/* Beginning row of text string
*/
int wn_cb;
/* Beginning column of text string,
*/
 
/* use CENTER_TEXT to center text
*/
UCHAR *stp;
/* Text to display on form
*/
UCHAR att;
/* Video attribute to write text
*/
DFORMPTR dfmp;
/* Pointer to form to write text on 
*/

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

You can also use bg_txtdef() to write prompts. Prompts defined using fld_def() are written using the form attribute. If you want to define prompts that have an attribute other than that of the form window, use bg_txtdef().


Home Contents Previous Next