public ShengListViewStandardLayoutManager(ShengListView imageListView)
     : base(imageListView)
 {
     this.ItemHeight     = 24;
     this.Renderer       = new ShengListViewStandardRenderer(this);
     this.Renderer.Theme = imageListView.Theme;
 }
Exemplo n.º 2
0
        public ShengComboSelector2()
        {
            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 ShengListView();
            _listView.Padding             = new System.Windows.Forms.Padding(0);
            _listView.BorderStyle         = BorderStyle.None;
            _listView.AllowMultiSelection = false;
            _listView.LayoutMode          = ShengListViewLayoutMode.Descriptive;

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

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

            this._dropDownHideTime = DateTime.UtcNow;

            ApplyTheme();
        }
 public ShengListViewDescriptiveLayoutManager(ShengListView imageListView)
     : base(imageListView)
 {
     this.ItemHeight     = 40;
     this.Renderer       = new ShengListViewDescriptiveRenderer(this);
     this.Renderer.Theme = imageListView.Theme;
 }
Exemplo n.º 4
0
 internal void Dispose()
 {
     _imageListView.Controls.Remove(_vScrollBar);
     _vScrollBar.Dispose();
     _scrollTimer.Stop();
     _scrollTimer.Enabled = false;
     _scrollTimer.Dispose();
     _renderer.Dispose();
     _imageListView = null;
 }
Exemplo n.º 5
0
        //public int StartCol { get; set; }
        //public int EndCol { get; set; }

        #endregion

        #region 构造

        public ShengListViewLayoutManager(ShengListView 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;
        }