# Checkbox Alignment, Justification
> [HTML Version](checkboxalignmentjust.htm)
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\]](https://bitbucket.org/microsabio/exlib/src/master/908041/tstcbz.bp)).
(./images/ashref_img109.png)
**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.