Nuaj.Cirrus.Utility.FloatTrackbarControl.OnPaint C# (CSharp) Method

OnPaint() protected method

protected OnPaint ( PaintEventArgs e ) : void
e PaintEventArgs
return void
        protected override void OnPaint( PaintEventArgs e )
        {
            base.OnPaint( e );

            // Draw the slider
            DrawSlider( e );

            // Draw the left image portion
            e.Graphics.DrawImage( Properties.Resources.Trackbar___Left, 0, 0, Properties.Resources.Trackbar___Left.Width, Properties.Resources.Trackbar___Left.Height );

            // Draw the middle image portion
            int		DrawLeft = Properties.Resources.Trackbar___Left.Width;
            int		DrawRight = Width - Properties.Resources.Trackbar___Right.Width;
            e.Graphics.FillRectangle( m_BrushTrackbarMiddle, DrawLeft, 0, DrawRight - DrawLeft, Properties.Resources.Trackbar___Middle.Height );

            // Draw the right image portion
            e.Graphics.DrawImage( Properties.Resources.Trackbar___Right, DrawRight, 0, Properties.Resources.Trackbar___Right.Width, Properties.Resources.Trackbar___Right.Height );
        }