public SEListViewStandardLayoutManager(SEListView imageListView)
     : base(imageListView)
 {
     this.ItemHeight     = 24;
     this.Renderer       = new SEListViewStandardRenderer(this);
     this.Renderer.Theme = imageListView.Theme;
 }
        public SEComboSelector2()
        {
            if (DesignMode)
            {
                return;
            }

            SetStyle(ControlStyles.ResizeRedraw, true);
            SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
            SetStyle(ControlStyles.Selectable, true);

            this.Padding = new System.Windows.Forms.Padding(5);

            _listView                     = new SEListView();
            _listView.Padding             = new System.Windows.Forms.Padding(0);
            _listView.BorderStyle         = BorderStyle.None;
            _listView.AllowMultiSelection = false;
            _listView.LayoutMode          = ListViewLayoutMode.Descriptive;

            //SelectedItemChanaged事件不行,如果就点当前已选中的项,就关不掉下拉框了
            _listView.Click += new EventHandler(_listView_Click);
            _listView.SelectedItemChanaged += new EventHandler(_listView_SelectedItemChanaged);
            _listView.ItemTextGetting      += new EventHandler <SEListViewGetItemTextEventArgs>(_listView_ItemTextGetting);

            _popup         = new Popup(_listView);
            _popup.Closed += new ToolStripDropDownClosedEventHandler(_popup_Closed);

            this._dropDownHideTime = DateTime.UtcNow;

            ApplyTheme();
        }
Esempio n. 3
0
 public SEListViewDescriptiveLayoutManager(SEListView imageListView)
     : base(imageListView)
 {
     this.ItemHeight     = 40;
     this.Renderer       = new SEListViewDescriptiveRenderer(this);
     this.Renderer.Theme = imageListView.Theme;
 }
 internal void Dispose()
 {
     _imageListView.Controls.Remove(_vScrollBar);
     _vScrollBar.Dispose();
     _scrollTimer.Stop();
     _scrollTimer.Enabled = false;
     _scrollTimer.Dispose();
     _renderer.Dispose();
     _imageListView = null;
 }
        //public int StartCol { get; set; }
        //public int EndCol { get; set; }

        #endregion

        #region 构造

        public SEListViewLayoutManager(SEListView imageListView)
        {
            _imageListView = imageListView;

            //_itemSize = new Size(ImageSize, ImageSize);
            _itemHeightWithMargin = _itemHeight + _margin;

            UpdateScrollBars();

            _vScrollBar.Dock = DockStyle.Right;
            _imageListView.Controls.Add(_vScrollBar);
            _vScrollBar.Scroll       += new ScrollEventHandler(_vScrollBar_Scroll);
            _vScrollBar.ValueChanged += new EventHandler(_vScrollBar_ValueChanged);

            _scrollTimer.Interval = 20;
            _scrollTimer.Enabled  = false;
            _scrollTimer.Tick    += new EventHandler(_scrollTimer_Tick);

            //_renderer = new ListViewStandardRenderer(this);
            //_renderer = new ListViewRenderer(this);
            //_renderer = new ListViewDescriptiveRenderer(this);

            //_renderer.Theme = _imageListView.Theme;
        }