Please enable JavaScript to view this site.

ASQL Reference

Navigation: » No topics above this level «

Checkbox Alignment, Justification

Scroll Prev Top Next More

There are two parts to a checkbox control (the text label and the checkbox itself), and six ways to arrange them, as shown here (from the sample program TSTCBZ in EXLIB:[908,41]).

ashref_img109

AUI_CONTROL Calls

The checkboxes in the upper group were created with these AUI_CONTROL calls:

xcall AUI, AUI_CONTROL, OPCODE, ID(1), "Left Text; Left Justify",  MBST_ENABLE, MBF_CHKBOX + MBF_LFTEXT + MBF_LFJUST, CMD$, CB1,  STATUS, 2, 2, 2, 24, 67, -2,  0, 0, "",  "", GRPID1

xcall AUI, AUI_CONTROL, OPCODE, ID(2), "Left Text; Right Justify",  MBST_ENABLE, MBF_CHKBOX + MBF_LFTEXT + MBF_RTJUST, CMD$, CB2,  STATUS, 3, 2, 3, 24, 67, -2,  0, 0, "",  "", GRPID1

xcall AUI, AUI_CONTROL, OPCODE, ID(3), "Right Text; Left Justify",  MBST_ENABLE, MBF_CHKBOX + MBF_LFJUST, CMD$, CB3,  STATUS, 5, 2, 5, 24, 67, -2,  0, 0, "",  "", GRPID1

xcall AUI, AUI_CONTROL, OPCODE, ID(4), "Right Text; Right Justify",  MBST_ENABLE, MBF_CHKBOX + MBF_RTJUST, CMD$, CB4,  STATUS, 6, 2, 6, 24, 67, -2,  0, 0, "",  "", GRPID1

xcall AUI, AUI_CONTROL, OPCODE, ID(5), "Left Text; Center Justify",  MBST_ENABLE, MBF_CHKBOX + MBF_LFTEXT, CMD$, CB5,  STATUS, 8, 2, 8, 24, 67, -2,  0, 0, "",  "", GRPID1

xcall AUI, AUI_CONTROL, OPCODE, ID(6), "Right Text; Center Justify",  MBST_ENABLE, MBF_CHKBOX, CMD$, CB6,  STATUS, 9, 2, 9, 24, 67, -2,  0, 0, "",  "", GRPID1

 

INFLD Calls

The checkboxes in the lower group were created with INFLD, which only supports four of the six possible alignments:

xcall INFLD, 2, 2, 23, 0, "||c", CB$(1), INXCTL, GRPID2+1, 2, EXITCODE, 0, 0, -1, -1, -1, "Left Text; Left Justify"

xcall INFLD, 3, 2, 23, 0, "||c|J", CB$(2), INXCTL, GRPID2+1, 2, EXITCODE, 0, 0, -1, -1, -1, "Left Text; Right Justify"

xcall INFLD, 5, 2, 23, 0, "||cR", CB$(1), INXCTL, GRPID2+1, 2, EXITCODE, 0, 0, -1, -1, -1, "Right Text; Left Justify"

xcall INFLD, 6, 2, 23, 0, "||cR|J", CB$(2), INXCTL, GRPID2+1, 2, EXITCODE, 0, 0, -1, -1, -1, "Right Text; Right Justify"

type code legend: ||c is for checkbox; R reverses the normal alignment (putting the checkbox on the left and the text on the right), and |J right justifies the text. |J is the same as setting SBR=INFLDCBRJ but has the advantage of being easy to change from one field to the next.

INFLD uses the setdef parameter for specifying the text associated with checkboxes.