Exemplo n.º 1
0
        //=====================================================================

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="cb">The owner of the drop-down</param>
        internal MultiColumnDropDown(MultiColumnComboBox cb)
        {
            owner = cb;

            // Set the value of the double-buffering style bits to true
            this.SetStyle(ControlStyles.DoubleBuffer | ControlStyles.UserPaint |
                          ControlStyles.AllPaintingInWmPaint | ControlStyles.ResizeRedraw, true);
            this.UpdateStyles();

            InitializeComponent();

            dgDropDown.MouseTracking = owner.MouseTracking;

            if (owner.DropDownStyle == ComboBoxStyle.Simple)
            {
                this.TabStop             = false;
                dgDropDown.IsSimpleStyle = true;
                dgDropDown.Height        = this.Height - 1;
                dgDropDown.TabStop       = false;
            }
        }
        //=====================================================================
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="cb">The owner of the drop-down</param>
        internal MultiColumnDropDown(MultiColumnComboBox cb)
        {
            owner = cb;

            // Set the value of the double-buffering style bits to true
            this.SetStyle(ControlStyles.DoubleBuffer | ControlStyles.UserPaint |
                ControlStyles.AllPaintingInWmPaint | ControlStyles.ResizeRedraw, true);
            this.UpdateStyles();

            InitializeComponent();

            dgDropDown.MouseTracking = owner.MouseTracking;

            if(owner.DropDownStyle == ComboBoxStyle.Simple)
            {
                this.TabStop = false;
                dgDropDown.IsSimpleStyle = true;
                dgDropDown.Height = this.Height - 1;
                dgDropDown.TabStop = false;
            }
        }