ComponentFactory.Krypton.Toolkit.KryptonOffice2007Renderer.OnRenderStatusStripSizingGrip C# (CSharp) Method

OnRenderStatusStripSizingGrip() protected method

Raises the RenderStatusStripSizingGrip event.
protected OnRenderStatusStripSizingGrip ( System.Windows.Forms.ToolStripRenderEventArgs e ) : void
e System.Windows.Forms.ToolStripRenderEventArgs An ToolStripRenderEventArgs containing the event data.
return void
        protected override void OnRenderStatusStripSizingGrip(ToolStripRenderEventArgs e)
        {
            using (SolidBrush darkBrush = new SolidBrush(KCT.GripDark),
                              lightBrush = new SolidBrush(KCT.GripLight))
            {
                // Do we need to invert the drawing edge?
                bool rtl = (e.ToolStrip.RightToLeft == RightToLeft.Yes);

                // Find vertical position of the lowest grip line
                int y = e.AffectedBounds.Bottom - _gripSize * 2 + 1;

                // Draw three lines of grips
                for (int i = _gripLines; i >= 1; i--)
                {
                    // Find the rightmost grip position on the line
                    int x = (rtl ? e.AffectedBounds.Left + 1 :
                                   e.AffectedBounds.Right - _gripSize * 2 + 1);

                    // Draw grips from right to left on line
                    for (int j = 0; j < i; j++)
                    {
                        // Just the single grip glyph
                        DrawGripGlyph(e.Graphics, x, y, darkBrush, lightBrush);

                        // Move left to next grip position
                        x -= (rtl ? -_gripMove : _gripMove);
                    }

                    // Move upwards to next grip line
                    y -= _gripMove;
                }
            }
        }