Skip to content

Latest commit

 

History

History
80 lines (55 loc) · 2.96 KB

File metadata and controls

80 lines (55 loc) · 2.96 KB
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

Alignment Settings in Windows Forms CheckBox (CheckBoxAdv)

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](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 %}

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'.

{% tabs %} {% highlight c# %}

this.checkBoxAdv1.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;

{% endhighlight %}

{% highlight vb %}

Me.checkBoxAdv1.CheckAlign = System.Drawing.ContentAlignment.MiddleRight

{% endhighlight %} {% endtabs %}

Windows forms CheckBoxAdv Changed the position

{% seealso %}

Text Settings, CheckBoxAdv Settings {% endseealso %}