ExtendedRadioButton
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 RadioButton control!
public sealed class ExtendedRadioButton : System.Windows.Forms.RadioButton
Inherits from / implements: System.Windows.Forms.RadioButton
Remarks
The Suite comprises of two controls - A extended version of CheckBox and an extended version of RadioButton .NET controls.
ExtendedRadioButton class implements various extended GUI features to the standard .NET framework RadioButton control, by overriding many of its Window messages and implementing a custom paint routine.
The following are the major extended GUI features provided by ExtendedRadioButton .NET control: -
1. Custom control painting - The control supports painting itself using a user specified color. By default, the control draws its RadioButton "circle" and the "dot" mark using the Black color value.
When you want the control to paint its RadioButton circle and the "dot" mark using a color of your choice, you can set the control's property NormalBorderColor 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
ExtendedRadioButton | Constructs a new instance of ExtendedRadioButton class. |
ControlBackColor | Gets or sets the custom painting color for drawing the ExtendedRadioButton background color. |
FlatStyle | Gets or sets the FlatStyle for the control. |
NormalBorderColor | Gets or sets the Painting color when ExtendedRadioButton control remains in a normal (non-focus) mode. |
OnFocusControlColor | Gets or sets the Painting color when ExtendedRadioButton 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 | — |
OnMouseLeave | Raises the MouseLeave event. ExtendedRadioButton overrides it so the control's own handling runs alongside the base behavior. |
OnPaint | Paints the control: its glyph, its text, and the focus cue. |
WndProc | — |
Constructors
ExtendedRadioButton
Constructs a new instance of ExtendedRadioButton class.
Properties
ControlBackColor
Gets or sets the custom painting color for drawing the ExtendedRadioButton 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.NormalBorderColor
Gets or sets the Painting color when ExtendedRadioButton 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 ExtendedRadioButton 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
No summary in the source yet.
OnMouseLeave
Raises the MouseLeave event. ExtendedRadioButton overrides it so the control's own handling runs alongside the base behavior.
- e
- The data for the event.
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.