ComponentFactory.Krypton.Toolkit.ViewDrawTP.ViewDrawTP C# (CSharp) Method

ViewDrawTP() public method

Initialize a new instance of the ViewDrawTrackPosition class.
public ViewDrawTP ( ViewDrawTrackBar drawTrackBar ) : System
drawTrackBar ViewDrawTrackBar Reference to owning track bar.
return System
        public ViewDrawTP(ViewDrawTrackBar drawTrackBar)
        {
            _drawTrackBar = drawTrackBar;

            // Create child view elements
            _drawTrack = new ViewDrawTrackTrack(_drawTrackBar);
            _drawPosition = new ViewDrawTrackPosition(_drawTrackBar);
            Add(_drawTrack);
            Add(_drawPosition);

            // Use controller for the entire track area
            TrackBarController tbController = new TrackBarController(this);
            drawTrackBar.MouseController = tbController;
            drawTrackBar.KeyController = tbController;
            drawTrackBar.SourceController = tbController;

            // Use controller for dragging the position indicator
            TrackPositionController tpController = new TrackPositionController(this);
            _drawPosition.MouseController = tpController;
        }