Exemplo n.º 1
0
        public Table()
        {
            _vScroll                = new VScroll(this);
            _vScroll.BackColor      = ColorStyles.ScrollBackColor;
            _vScroll.MouseMoveColor = ColorStyles.ScrollMouseMoveColor;
            _vScroll.OnScrollEvent += new EventHandler <ScrollEventArgs>(VScroll_OnScrollEvent);

            _hScroll                = new HScroll(this);
            _hScroll.BackColor      = ColorStyles.ScrollBackColor;
            _hScroll.MouseMoveColor = ColorStyles.ScrollMouseMoveColor;
            _hScroll.OnScrollEvent += new EventHandler <ScrollEventArgs>(VScroll_OnScrollEvent);

            _tableColumns = new TableColumnCollection(this);
            _rows         = new List <RectangleF>();
        }
Exemplo n.º 2
0
        public FTable()
        {
            this.SetStyle(ControlStyles.ResizeRedraw, true);
            this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
            this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
            this.SetStyle(ControlStyles.UserPaint, true);
            this.SetStyle(ControlStyles.SupportsTransparentBackColor, true);
            this.SetStyle(ControlStyles.Selectable, true);
            //强制分配样式重新应用到控件上
            UpdateStyles();
            this.Size   = new Size(150, 250);
            borderStyle = BorderStyle.FixedSingle;

            chatVScroll = new VScroll(this);
            listHScroll = new HScroll(this);
            chatVScroll.OnScrollEvent += ChatVScroll_OnScrollEvent;
            listHScroll.OnScrollEvent += ChatVScroll_OnScrollEvent;
            Rows = new List <ViewHolder>();
        }