Adds a check box to the current form. The check box is a form control that allows the operator to make individual selections. Each check box can be either checked (true) or cleared (false).
You should call this function only after the FormNew() function and before the FormRead() function. The check box is added to the form at the specified column and row position. The width of the button is automatically sized to suit the text.
FormCheckBox(Col, Row, sText, sBuf)
The number of the column in which the check box will be placed. Enter a number from 0 (column 1) to the form width - 1. For example, to place the check box in column 8, enter 7.
The number of the row in which the check box will be placed. Enter a number from 0 (row 1) to the form height - 1. For example, to place the check box in row 6, enter 5.
The text associated with the check box.
The string buffer in which to put the state of the check box. You should initialize this buffer to the state of the check box. When the form returns, this buffer will contain either '1' or '0' if the box is checked.
The field handle if the check box is successfully added, otherwise -1 is returned.
! Create a form, add check boxes, and display the form.
! The operator may select none or all of the check boxes.
STRING sNuts, sCherrys, sChocolate;
sNuts = "1";
sCherrys = "0";
sChocolate = "1";
FormCheckBox(2 ,2,"Nuts", sNuts);
FormCheckBox(2, 3,"Cherrys", sCherrys);
FormCheckBox(2 ,4,"Chocolate", sChocolate);
If sNuts = "1" THEN
! add the nuts
IF sCherrys = "1" THEN
! add the cherrys
IF sChocolate = "1" THEN
! add the chocolate