| layout | post |
|---|---|
| title | Alignment Settings in Windows Forms CheckBox control | Syncfusion® |
| description | Learn about Alignment Settings support in Syncfusion® Windows Forms CheckBox (CheckBoxAdv) control and more details. |
| platform | windowsforms |
| control | EditorsPackage |
| documentation | ug |
This section discusses the alignment settings of the CheckBoxAdv control.
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](https://help.syncfusion.com/windowsforms/checkbox/text-settings)' | markdownify}} |
{% tabs %} {% highlight c# %}
this.checkBoxAdv1.TextContentAlignment = System.Drawing.ContentAlignment.MiddleCenter;
{% endhighlight %}
{% highlight vb %}
Me.checkBoxAdv1.TextContentAlignment = System.Drawing.ContentAlignment.MiddleCenter
{% endhighlight %} {% endtabs %}
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'. |
{% tabs %} {% highlight c# %}
this.checkBoxAdv1.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
{% endhighlight %}
{% highlight vb %}
Me.checkBoxAdv1.CheckAlign = System.Drawing.ContentAlignment.MiddleRight
{% endhighlight %} {% endtabs %}
{% seealso %}
Text Settings, CheckBoxAdv Settings {% endseealso %}

