Alignment Settings in Windows Forms CheckBox (CheckBoxAdv)

28 Oct 20221 minute to read

This section discusses the alignment settings of the CheckBoxAdv control.

Text Alignment

Text alignment of CheckBoxAdv can be changed by using the TextContentAlignment property with TopLeft, TopCenter, TopRight, MiddleLeft, MiddleCenter, MiddleRight, BottomLeft, BottomCenter and BottomRight as options.

CheckBoxAdv Properties Description
TextContentAlignment Indicates the alignment of the text.The default value is set to `MiddleLeft`. WrapText property must be set to 'False'. Refer

Text Settings

this.checkBoxAdv1.TextContentAlignment = System.Drawing.ContentAlignment.MiddleCenter;
Me.checkBoxAdv1.TextContentAlignment = System.Drawing.ContentAlignment.MiddleCenter

Windows forms CheckBoxAdv Changed text alignment

CheckBox Alignment

The CheckBox alignment of CheckBoxAdv can be changed to any desired location using CheckAlign property with TopLeft, TopCenter, TopRight, MiddleLeft, MiddleCenter, MiddleRight, BottomLeft, BottomCenter and BottomRight as options.

CheckBoxAdv Properties Description
CheckAlign Indicates the alignment of the CheckBox. The default value is set to 'MiddleLeft'.
this.checkBoxAdv1.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
Me.checkBoxAdv1.CheckAlign = System.Drawing.ContentAlignment.MiddleRight

Windows forms CheckBoxAdv Changed the position

See Also

Text Settings, CheckBoxAdv Settings