Introduction
This article introduces check boxes with different checked and border styles. The following list shows the different properties and events associated with them.
Properties
Caption
(String
) - Addition of a text.
CheckedColor
(Color
) - Selected color.
CheckedState
(Boolean
) - Checkbox is selected or deselected.
CStyle
(Enum
) - The kind of selected graphics.
EnableClickSound
(Boolean
) - Play sound on click.
FocusColor
(Color
) - Color of rectangle when it gets focus.
FStyle
(Enum
) - Visible style.
HoverAnimation
(Boolean
) - Fade animation when moving.
SmoothingMode
(SmoothingMode
) - Quality of the graphics.
StyleKind
(Enum
) - Kind of visible style.
TextFont
(Font
)- Font of the text.
TextColor
(Color
) - Color of the text.
Events
BeforeChanging
- Event which will execute before checking.
CheckedChanged
- Event which will execute after checking.
Examples
- Show "
MessageBox
" after click when in "Checked_State
":
Private Sub CheckBox1_CheckedChanged(ByVal _
Checked_State As Boolean) Handles CheckBox1.CheckedChanged
MsgBox(Checked_State)
End Sub
- Change "
ForeColor
" of the text after click:
Private Sub CheckBox1_CheckedChanged(ByVal Checked_State _
As Boolean) Handles CheckBox1.CheckedChanged
CheckBox1.ForeColor = Color.Red
End Sub
- Change kind of style after click:
Private Sub CheckBox1_CheckedChanged(ByVal Checked_State _
As Boolean) Handles CheckBox1.CheckedChanged
CheckBox1.FStyle = CheckBox.CheckBox.Flat_Style.Blue
CheckBox1.CStyle = CheckBox.CheckBox.Check_style.Draw_X
CheckBox1.StyleKind = CheckBox.CheckBox.Style_Kind.Circle
End Sub
- Change "
SmoothingMode
":
Private Sub CheckBox1_CheckedChanged(ByVal Checked_State _
As Boolean) Handles CheckBox1.CheckedChanged
CheckBox1.SmoothingMode = Drawing2D.SmoothingMode.HighQuality
End Sub
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.