SaaCheckBox
Last updated
Last updated
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.
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.
These are properties that will help you dictate how the control is drawn.
BoxOffSet
tells how far the box will move from left to right and from top to bottom.
OffTextX
and OffTextY
tells how far the the text will move from left to right and top to bottom respectively.
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;
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.
Forexample: If you set BoxOffSet
to 10 and TickOffX3
to 10 this is what you will get;
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.
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.
Text
tells the text associated with checkbox.
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
.
CheckChanged
is fired when the Checked property gets changed.