DekGenius.com
[ Team LiB ] Previous Section Next Section

RadioButtonmarshal by reference, disposable

System.Windows.Forms (system.windows.forms.dll)class

This Control provides a means of selecting one of a set of mutually exclusive options. (Compare this with a set of CheckBox objects that may all be selected simultaneously.) All the RadioButton objects within a single container act as a single exclusion group. Therefore, to have several independent groups on the same parent Control, you must place them in different containers. Panel or GroupBox objects will do the job.

You can change the Appearance of the control from the Normal dot with a label to a Button-like style. In the Normal view, the position of the RadioButton relative to the label can be modified with the CheckAlign property.

As with the CheckBox, you can determine whether the item is Checked (although it does not have an equivalent of the CheckBox.CheckState property, as there is no tristate support). You can also enable AutoCheck to ensure that the system automatically checks the selected button and unchecks the others in the group. You can bind to the CheckedChanged event to be notified when the Checked state changes.

public class RadioButton : ButtonBase {
// Public Constructors
   public RadioButton();
// Public Instance Properties
   public Appearance Appearance{set; get; }
   public bool AutoCheck{set; get; }
   public ContentAlignment CheckAlign{set; get; }
   public bool Checked{set; get; }
   public bool TabStop{set; get; }
// overrides Control
   public override ContentAlignment TextAlign{set; get; }
// overrides ButtonBase
// Protected Instance Properties
   protected override CreateParams CreateParams{get; }
// overrides ButtonBase
   protected override Size DefaultSize{get; }
// overrides ButtonBase
// Public Instance Methods
   public void PerformClick();
   public override string ToString();  // overrides System.ComponentModel.Component
// Protected Instance Methods
   protected override AccessibleObject CreateAccessibilityInstance();  // overrides ButtonBase
   protected virtual void OnCheckedChanged(EventArgs e);
   protected override void OnClick(EventArgs e);  // overrides Control
   protected override void OnEnter(EventArgs e);  // overrides Control
   protected override void OnHandleCreated(EventArgs e);  // overrides Control
   protected override void OnMouseUp(MouseEventArgs mevent);  // overrides ButtonBase
   protected override bool ProcessMnemonic(char charCode);  // overrides Control
// Events
   public event EventHandler AppearanceChanged;
   public event EventHandler CheckedChanged;
}

Hierarchy

System.Object System.MarshalByRefObject System.ComponentModel.Component(System.ComponentModel.IComponen, System.IDisposable) Control(IOleContro, IOleObject, IOleInPlaceObject, IOleInPlaceActiveObject, IOleWindow, IViewObject, IViewObject2, IPersist, IPersistStreamInit, IPersistPropertyBag, IPersistStorage, IQuickActivate, System.ComponentModel.ISynchronizeInvoke, IWin32Window) ButtonBase RadioButton

Passed To

RadioButtonAccessibleObject.RadioButtonAccessibleObject()

    [ Team LiB ] Previous Section Next Section