/// <summary> /// Initializes a new instance of the <see cref="LabeledRadioButton"/> class. /// </summary> /// <param name="parent">Parent control.</param> public LabeledRadioButton(Base parent) : base(parent) { MouseInputEnabled = true; SetSize(100, 20); m_RadioButton = new RadioButton(this); //m_RadioButton.Dock = Pos.Left; // no docking, it causes resizing //m_RadioButton.Margin = new Margin(0, 2, 2, 2); m_RadioButton.IsTabable = false; m_RadioButton.KeyboardInputEnabled = false; m_Label = new Label(this); m_Label.Alignment = Pos.CenterV | Pos.Left; m_Label.Text = "Radio Button"; m_Label.Clicked += delegate(Base control, ClickedEventArgs args) { m_RadioButton.Press(control); }; m_Label.IsTabable = false; m_Label.KeyboardInputEnabled = false; }
/// <summary> /// Initializes a new instance of the <see cref="LabeledRadioButton"/> class. /// </summary> /// <param name="parent">Parent control.</param> public LabeledRadioButton(ControlBase parent) : base(parent) { MouseInputEnabled = true; m_RadioButton = new RadioButton(this); m_RadioButton.IsTabable = false; m_RadioButton.KeyboardInputEnabled = false; m_Label = new Label(this); m_Label.Alignment = Alignment.CenterV | Alignment.Left; m_Label.Text = "Radio Button"; m_Label.Clicked += delegate(ControlBase control, ClickedEventArgs args) { m_RadioButton.Press(control); }; m_Label.IsTabable = false; m_Label.KeyboardInputEnabled = false; }