> For the complete documentation index, see [llms.txt](https://docs.saabytes.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.saabytes.com/controls/saacheckbox.md).

# SaaCheckBox

![](https://3593808699-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MeLJp7jLxK-XmIvfxh3%2F-Mf92J2CNr6g287ZeenK%2F-Mf92UqMPi5WlwA3XSIf%2FSaaCheckBox.png?alt=media\&token=6c6b0bc1-e5bd-4211-b15a-b77d2d599e42)

## 1. Colors

SaaCheckBox has one background color, two box colors, one border color, one tick color, one tick path color and one text color. Also it supports color angles to adjust where colors will meet at.

`BackColor` is background color of the control. by default it is transparent, which means it takes the color of the parent control.

`BoxColor` and `BoxColor2` are the colors of the rectangular box that holds the tick. They can be adjusted where they are displayed with `BoxColorAngle` which by default is 90deg.

`BorderColor` is the color drawn around the edges of the Box.

`TickColor` is the color of the tick.

`TickPathColor` is the color of the tick placeholder when it is unchecked.

`ForeColor` is the color for the text.

## 2. Re-Size

SaaCheckBox supports both defined sizes and auto resizing. if you choose auto resizing then the control will re-size itself to fit its contents.

`Size` which has Width and Height tells the overall size of the control.

`AutoResize` tells whether the control will auto re-size to fit its contents.

`BoxWidth` and `BoxHeight` tell the size of the box.

## 3. Offsets

These are properties that will help you dictate how the control is drawn.

#### 3.1 Box and Text offsets

`BoxOffSet` tells how far the box will move from left to right and from top to bottom.

![](https://3593808699-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MeLJp7jLxK-XmIvfxh3%2F-MeLT5YsTlE5S1iJu1sd%2F-MeLTla-yYIHFYgGNFd_%2FSaaCheckBox%20BoxOffSet.png?alt=media\&token=c3388477-4009-4158-91d7-54b0fd324eed)

`OffTextX` and `OffTextY` tells how far the the text will move from left to right and top to bottom respectively.

![](https://3593808699-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MeLJp7jLxK-XmIvfxh3%2F-MeLT5YsTlE5S1iJu1sd%2F-MeLTw_j7NeCnibzSiUi%2FSaaCheckBoxOffTextYX.png?alt=media\&token=8dc2ac84-cfa2-4af9-b7a5-e16afbc5034f)

#### 3.2 Tick and TickPath offsets

Both the tick and its tickpath are drawn using three coordinates, (X1, Y1) (X2.Y2) (X3,Y3) which are available as (`TickOffX1`, `TickOffY1`) (`TickOffX2`, `TickOffY2`) (`TickOffX3`, `TickOffY3`) respectively. Adjusting them will help you redraw the tick and its tickpath to whatever shape you want.

Please see the illustration below;

![](https://3593808699-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MeLJp7jLxK-XmIvfxh3%2F-MeLT5YsTlE5S1iJu1sd%2F-MeLU4dvIonEfwXvl7Lz%2FSaaCheckBox%20Tick%20Coordinates.png?alt=media\&token=e784a04f-4739-4550-bbb3-806d86525d3f)

Both the Tick and the TickPath are drawn over the Box and are absolute in position. This means they are not limited within the box and they can be drawn beyond the box boundaries. However, if the box is moved with `BoxOffSet`, they will also be moved with the box without effecting your coordinate changes.

![](https://3593808699-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MeLJp7jLxK-XmIvfxh3%2F-MeLT5YsTlE5S1iJu1sd%2F-MeLUENGO6ExdPks5Bgn%2FSaaCheckBox%20TickOutSide.png?alt=media\&token=ca214c50-aa32-4969-835e-945bf7e134bf)

Forexample: If you set `BoxOffSet` to 10 and `TickOffX3` to 10 this is what you will get;

![](https://3593808699-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MeLJp7jLxK-XmIvfxh3%2F-MeLU7itDqvA8DXY5i3B%2F-MeLUnhwsED5mxWYw0pY%2FScheckBox%20Example%20BoxOffset%20and%20OffSetX3.png?alt=media\&token=0544e167-b706-4d4c-9b83-aa56c03a676b)

## &#x20;

## 4. Tick Styles and Mouse

`TickStyle` tells whether the tick line is `dashed`, `solid`, `dotted` etc. By default it is `solid`. See the image below, it is a dotted TickStyle.

![](https://3593808699-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MeLJp7jLxK-XmIvfxh3%2F-MeLU7itDqvA8DXY5i3B%2F-MeLUYDOVBiw_ZrHWbjy%2FsaaCheckBox%20TickStyle.png?alt=media\&token=38190b79-359d-464d-8cb5-8b02cd6f8f61)

`TickThickness` tells the size or the thickness of the tick line.

`TickPath` is a bool property that tells whether the TickPath is shown. TickPath is a placeholder for the Tick that is shown when the control is unchecked and the Tick is removed.

`BorderStyle` tells whether the border line is `dashed`, `solid`, `dotted` etc. By default it is `solid`.

`Checked` tells whether the checkbox is checked and the tick is drawn. `Checked` Returns true if checked otherwise false.

`BorderThickness` tells the size or the thickness of the border line.

`TickJoints` tells how the tick lines are connected to each other.

`MouseClicks` is enum that tells which mouse click does the control accept. This means, will the control is checked or unchecked when the right mouse button, left mouse button, both buttons are clicked or no buttons at all. It  has these properties;

`LeftClick` means the control is checked or unchecked only when left mouse button is clicked.

`RightClick` means the control is checked or unchecked only when right mouse button is clicked.

`AnyClick` means the control is checked or unchecked with any click no matter what caused it.

`NoClick` means the control does not accept any type of click. This is like the control is disabled from any action.

## 5. Text

`Text` tells the text associated with checkbox.

## 6. Radius

`Radius` property tells the roundness of the Box edges. With this property you can change the shapes of the border edges. `Radius` has four properties:`TopLeft`, `TopRight`, `BottomRight`, `BottomLeft`.

## 7. Events

`CheckChanged` is fired when the Checked property gets changed.

```csharp
saaCheckBox1.CheckChanged += saaCheckBox1_CheckChanged;
private void saaCheckBox1_CheckChanged(object sender, EventArgs e)
{
   var mouseEvents = (MouseEventArgs)e;
  //Then rest of your code
}
```
