Ejemplo n.º 1
0
 public CheckBoxComboBoxListControl(CheckBoxComboBox owner)
     : base()
 {
     DoubleBuffered    = true;
     _CheckBoxComboBox = owner;
     _Items            = new CheckBoxComboBoxItemList(_CheckBoxComboBox);
     BackColor         = SystemColors.Window;
     // AutoScaleMode = AutoScaleMode.Inherit;
     AutoScroll   = true;
     ResizeRedraw = true;
     // if you don't set this, a Resize operation causes an error in the base class.
     MinimumSize = new Size(1, 1);
     MaximumSize = new Size(500, 500);
 }
Ejemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="owner">A reference to the CheckBoxComboBox.</param>
        /// <param name="comboBoxItem">A reference to the item in the ComboBox.Items that this object is extending.</param>
        public CheckBoxComboBoxItem(CheckBoxComboBox owner, object comboBoxItem)
            : base()
        {
            DoubleBuffered    = true;
            _CheckBoxComboBox = owner;
            _ComboBoxItem     = comboBoxItem;
            if (_CheckBoxComboBox.DataSource != null)
            {
                AddBindings();
            }
            else
            {
                CheckBoxComboBoxItem instance = comboBoxItem as CheckBoxComboBoxItem;

                if (instance != null)
                {
                    Text = instance.Text;
                }
                else
                {
                    Text = comboBoxItem.ToString();
                }
            }
        }
Ejemplo n.º 3
0
 public CheckBoxComboBoxItemList(CheckBoxComboBox checkBoxComboBox)
 {
     _CheckBoxComboBox = checkBoxComboBox;
 }