protected DarkScrollBase() { SetStyle(ControlStyles.Selectable | ControlStyles.UserMouse, true); _vScrollBar = new DarkScrollBar { ScrollOrientation = DarkScrollOrientation.Vertical }; _hScrollBar = new DarkScrollBar { ScrollOrientation = DarkScrollOrientation.Horizontal }; Controls.Add(_vScrollBar); Controls.Add(_hScrollBar); _vScrollBar.ValueChanged += delegate { UpdateViewport(); }; _hScrollBar.ValueChanged += delegate { UpdateViewport(); }; _vScrollBar.MouseDown += delegate { Select(); }; _hScrollBar.MouseDown += delegate { Select(); }; _dragTimer = new Timer(); _dragTimer.Interval = 1; _dragTimer.Tick += DragTimer_Tick; }
protected DarkScrollBase() { SetStyle(ControlStyles.Selectable | ControlStyles.UserMouse, true); _vScrollBar = new DarkScrollBar { ScrollOrientation = DarkScrollOrientation.Vertical }; _hScrollBar = new DarkScrollBar { ScrollOrientation = DarkScrollOrientation.Horizontal }; Controls.Add(_vScrollBar); Controls.Add(_hScrollBar); _vScrollBar.ValueChanged += delegate { UpdateViewport(); }; _hScrollBar.ValueChanged += delegate { UpdateViewport(); }; _vScrollBar.MouseDown += delegate { Select(); }; _hScrollBar.MouseDown += delegate { Select(); }; _dragTimer = new Timer(); _dragTimer.Interval = 1; _dragTimer.Tick += DragTimer_Tick; }