Class CheckBox
CheckBox control
public class CheckBox : Button
- Inheritance
-
CheckBox
- Derived
- Inherited Members
- Extension Methods
Constructors
CheckBox(Dialog)
Create new checkbox instance
public CheckBox(Dialog parent)
Parameters
parent
Dialog
Fields
BoxLayer
public const int BoxLayer = 0
Field Value
CheckLayer
public const int CheckLayer = 1
Field Value
buttonRect
protected Rectangle buttonRect
Field Value
isBoxChecked
protected bool isBoxChecked
Field Value
textRect
protected Rectangle textRect
Field Value
Properties
IsChecked
Checked property
public virtual bool IsChecked { get; set; }
Property Value
Methods
ContainsPoint(Point)
Does the control contain the point?
public override bool ContainsPoint(Point pt)
Parameters
pt
Point
Returns
HandleKeyboard(WindowMessage, IntPtr, IntPtr)
Handle the keyboard for the checkbox
public override bool HandleKeyboard(WindowMessage msg, IntPtr wParam, IntPtr lParam)
Parameters
msg
WindowMessagewParam
IntPtrlParam
IntPtr
Returns
HandleMouse(WindowMessage, Point, IntPtr, IntPtr)
Handle mouse messages from the checkbox
public override bool HandleMouse(WindowMessage msg, Point pt, IntPtr wParam, IntPtr lParam)
Parameters
msg
WindowMessagept
PointwParam
IntPtrlParam
IntPtr
Returns
OnHotKey()
Override hotkey to fire event
public override void OnHotKey()
RaiseChangedEvent(CheckBox, bool)
Create new button instance
protected void RaiseChangedEvent(CheckBox sender, bool wasTriggeredByUser)
Parameters
Render(Device, float)
Render the checkbox control
public override void Render(Device device, float elapsedTime)
Parameters
device
DeviceelapsedTime
float
SetCheckedInternal(bool, bool)
Sets the checked state and fires the event if necessary
protected virtual void SetCheckedInternal(bool ischecked, bool fromInput)
Parameters
UpdateRectangles()
Update the rectangles
protected override void UpdateRectangles()
Events
Changed
public event EventHandler Changed