CheckBox control.
Inheritance: Button
Beispiel #1
0
        public void TestCheckBox()
        {
            var control = new CheckBox(canvas);
            GUI.Test(control, "CheckBox1");

            control.Toggle();
            GUI.Test(control, "CheckBox1_toggle");
        }
Beispiel #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="LabeledCheckBox"/> class.
        /// </summary>
        /// <param name="parent">Parent control.</param>
        public LabeledCheckBox(Control parent)
            : base(parent)
        {
            m_CheckBox = new CheckBox(this);
            m_CheckBox.Dock = Pos.Left;
            m_CheckBox.Margin = new Margin(0, 2, 2, 2);
            m_CheckBox.IsTabable = false;
            m_CheckBox.CheckChanged += OnCheckChanged;

            m_Label = new LabelClickable(this);
            m_Label.Dock = Pos.Fill;
            m_Label.Clicked += m_CheckBox.Press;
            m_Label.IsTabable = false;

            IsTabable = false;
        }