ExtendedCheckBox
BinaryButtonSuite .NET is a collection of extended version of CheckBox and Radio button .NET controls for the WinForms .NET platform!
This class extends the standard .NET CheckBox control!
public sealed class ExtendedCheckBox : CheckBox
Inherits from / implements: CheckBox
Remarks
The Suite comprises of two controls - A extended version of CheckBox and an extended version of RadioButton .NET controls.
ExtendedCheckBox class implements various extended GUI features to the standard .NET framework CheckBox control, by overriding many of its Window messages and implementing a custom paint routine.
The following are the major extended GUI features provided by ExtendedCheckBox .NET control: -
1. Custom control painting - The control supports painting itself using a user specified color. By default, the control draws its Checkbox and the "Check" mark using the Black color value.
When you want the control to paint its "CheckBox" rectangle and the "Check" mark using a color of your choice, you can set the control's property NormalControlColor to a Color value of your choice.
Once set with this value, the control paints itself with this color value whenever it is not in input focus.
The control also lets you decide the color for painting its background. (Refer ControlBackColor for more details)
When the control has the input focus or whenever the mouse hovers over the control, the control paints itself using the Highlight color value.
This color too can be changed by the user by setting its OnFocusControlColor property with a user specified color.
2. Mouse hovering effects - Whenever the control has the input focus, or whenever the mouse focus moves over and out of the control, the control's paints itself using a user-specified color value (OnFocusControlColor).
By default, on mouse hover or on getting the input focus, the control paints itself using the Highlight color value.
Members at a glance
ExtendedCheckBox | Constructs a blank instance of ExtendedCheckBox class. |
ControlBackColor | Gets or sets the custom painting color for drawing the BinaryCheckButton background color. |
FlatStyle | Gets or sets the FlatStyle for the control. |
NormalControlColor | Gets or sets the Painting color when ExtendedCheckBox control remains in a normal (non-focus) mode. |
OnFocusControlColor | Gets or sets the Painting color when ExtendedCheckBox control remains in a "focus" mode. |
GetPreferredSize | Returns the size the control would like to be, for the glyph and text it carries. |
OnGotFocus | — |
OnLostFocus | — |
OnMouseEnter | Raises the MouseEnter event. ExtendedCheckBox overrides it so the control's own handling runs alongside the base behavior. |
OnMouseLeave | — |
OnPaint | Paints the control: its glyph, its text, and the focus cue. |
WndProc | — |
Constructors
ExtendedCheckBox
Constructs a blank instance of ExtendedCheckBox class.
Properties
ControlBackColor
Gets or sets the custom painting color for drawing the BinaryCheckButton background color.
Value. A Color value.
By default, this property is set to
Window color value.FlatStyle
Gets or sets the FlatStyle for the control.
Value. A FlatStyle value.
FlatStyle remains Flat, irrespective of what the user sets.NormalControlColor
Gets or sets the Painting color when ExtendedCheckBox control remains in a normal (non-focus) mode.
Value. A Color value.
There are two sets of states for which you can set the color for the control's painting.
1. When the control is in a "Normal" mode - i.e., when the control remains not in focus.
2. When the control is in "focus" mode - i.e., when the control remain in input focus.
You can set this property when you want a color to be used when the control is in the Normal mode (as in 1 above).
OnFocusControlColor
Gets or sets the Painting color when ExtendedCheckBox control remains in a "focus" mode.
Value. A Color value.
There are two sets of states for which you can set the color for the control's painting.
1. When the control is in a "Normal" mode - i.e., when the control remains not in focus.
2. When the control is in "focus" mode - i.e., when the control remain in input focus.
You can set this property when you want a color to be used when the control is in "Focus" mode (as in 2 above).
Methods
GetPreferredSize
Returns the size the control would like to be, for the glyph and text it carries.
- proposedSize
- The size the layout engine is proposing.
Returns. The preferred size.
OnGotFocus
No summary in the source yet.
OnLostFocus
No summary in the source yet.
OnMouseEnter
Raises the MouseEnter event. ExtendedCheckBox overrides it so the control's own handling runs alongside the base behavior.
- e
- The data for the event.
OnMouseLeave
No summary in the source yet.
OnPaint
Paints the control: its glyph, its text, and the focus cue.
- e
- The data for the event.
WndProc
No summary in the source yet.