# FarPoint.Win.Spread.CellType.GradientHeaderRenderer.PaintHeader

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="FarPoint_Win_Spread_CellType_GradientHeaderRenderer_PaintHeader_" data-uid="FarPoint.Win.Spread.CellType.GradientHeaderRenderer.PaintHeader*">PaintHeader Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="FarPoint_Win_Spread_CellType_GradientHeaderRenderer_PaintHeader_" data-uid="FarPoint.Win.Spread.CellType.GradientHeaderRenderer.PaintHeader*"></a>
<h4 id="FarPoint_Win_Spread_CellType_GradientHeaderRenderer_PaintHeader_System_Drawing_Graphics_System_Drawing_Rectangle_System_Drawing_Rectangle_System_Drawing_Color_System_Drawing_Color_System_Drawing_Font_FarPoint_Win_HorizontalAlignment_FarPoint_Win_VerticalAlignment_System_Boolean_System_Boolean_System_String_System_String_FarPoint_Win_ButtonTextAlign_FarPoint_Win_TextOrientation_System_Boolean_System_Int32_System_Drawing_Color_System_Drawing_Color_System_Drawing_Image_System_Drawing_Image_System_Boolean_System_Drawing_Text_HotkeyPrefix_FarPoint_Win_VisualStyles_System_Boolean_System_Boolean_FarPoint_Win_Spread_Appearance_System_Double_" data-uid="FarPoint.Win.Spread.CellType.GradientHeaderRenderer.PaintHeader(System.Drawing.Graphics,System.Drawing.Rectangle,System.Drawing.Rectangle,System.Drawing.Color,System.Drawing.Color,System.Drawing.Font,FarPoint.Win.HorizontalAlignment,FarPoint.Win.VerticalAlignment,System.Boolean,System.Boolean,System.String,System.String,FarPoint.Win.ButtonTextAlign,FarPoint.Win.TextOrientation,System.Boolean,System.Int32,System.Drawing.Color,System.Drawing.Color,System.Drawing.Image,System.Drawing.Image,System.Boolean,System.Drawing.Text.HotkeyPrefix,FarPoint.Win.VisualStyles,System.Boolean,System.Boolean,FarPoint.Win.Spread.Appearance,System.Double)">PaintHeader(Graphics, Rectangle, Rectangle, Color, Color, Font, HorizontalAlignment, VerticalAlignment, bool, bool, string, string, ButtonTextAlign, TextOrientation, bool, int, Color, Color, Image, Image, bool, HotkeyPrefix, VisualStyles, bool, bool, Appearance, double)</h4>
<div class="markdown level1 summary"><p>Paints the column header cell.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public override void PaintHeader(Graphics g, Rectangle r, Rectangle rectTextIn, Color backColor, Color foreColor, Font font, HorizontalAlignment halign, VerticalAlignment valign, bool pressed, bool focus, string text, string textDown, ButtonTextAlign nAlign, TextOrientation textOrientation, bool wordWrap, int shadowSize, Color darkColor, Color lightColor, Image pictUp, Image pictDown, bool bLocked, HotkeyPrefix prefix, VisualStyles style, bool mouseOver, bool rightToLeft, Appearance appearance, double textRotationAngle)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Overrides Sub PaintHeader(g As Graphics, r As Rectangle, rectTextIn As Rectangle, backColor As Color, foreColor As Color, font As Font, halign As HorizontalAlignment, valign As VerticalAlignment, pressed As Boolean, focus As Boolean, text As String, textDown As String, nAlign As ButtonTextAlign, textOrientation As TextOrientation, wordWrap As Boolean, shadowSize As Integer, darkColor As Color, lightColor As Color, pictUp As Image, pictDown As Image, bLocked As Boolean, prefix As HotkeyPrefix, style As VisualStyles, mouseOver As Boolean, rightToLeft As Boolean, appearance As Appearance, textRotationAngle As Double)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.graphics">Graphics</a></td>
      <td><span class="parametername">g</span></td>
      <td><p>Graphics device interface for painting the header cell</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.rectangle">Rectangle</a></td>
      <td><span class="parametername">r</span></td>
      <td><p>Location and size of a rectangular region around the header cell</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.rectangle">Rectangle</a></td>
      <td><span class="parametername">rectTextIn</span></td>
      <td><p>Rectangular region for the text</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.color">Color</a></td>
      <td><span class="parametername">backColor</span></td>
      <td><p>Background color for the header cell</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.color">Color</a></td>
      <td><span class="parametername">foreColor</span></td>
      <td><p>Text color for the header cell</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.font">Font</a></td>
      <td><span class="parametername">font</span></td>
      <td><p>Font for the header cell</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="../FarPoint.Win/FarPoint.Win.HorizontalAlignment.html">HorizontalAlignment</a></td>
      <td><span class="parametername">halign</span></td>
      <td><p>Horizontal alignment of text in the header cell</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="../FarPoint.Win/FarPoint.Win.VerticalAlignment.html">VerticalAlignment</a></td>
      <td><span class="parametername">valign</span></td>
      <td><p>Vertical alignment of text in the header cell</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">pressed</span></td>
      <td><p>Whether the header cell appears as a pressed button</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">focus</span></td>
      <td><p>Whether the header cell has the focus (is active)</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">text</span></td>
      <td><p>Text string to appear in the header cell</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">textDown</span></td>
      <td><p>Text string to appear in the header cell if it is pressed (as a button)</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="../FarPoint.Win/FarPoint.Win.ButtonTextAlign.html">ButtonTextAlign</a></td>
      <td><span class="parametername">nAlign</span></td>
      <td><p>Alignment of the button in the column header cell</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="../FarPoint.Win/FarPoint.Win.TextOrientation.html">TextOrientation</a></td>
      <td><span class="parametername">textOrientation</span></td>
      <td><p>Orientation of the text with respect to the button picture in the header</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">wordWrap</span></td>
      <td><p>Whether the text wraps to multiple lines if needed</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">shadowSize</span></td>
      <td><p>Shadow thickness in pixels</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.color">Color</a></td>
      <td><span class="parametername">darkColor</span></td>
      <td><p>Color for the dark line part of the shadow</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.color">Color</a></td>
      <td><span class="parametername">lightColor</span></td>
      <td><p>Color for the light line part of the shadow</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.image">Image</a></td>
      <td><span class="parametername">pictUp</span></td>
      <td><p>Picture to display when the button is not pressed</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.image">Image</a></td>
      <td><span class="parametername">pictDown</span></td>
      <td><p>Picture to display when the button is pressed</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">bLocked</span></td>
      <td><p>Whether the header cell is locked</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.text.hotkeyprefix">HotkeyPrefix</a></td>
      <td><span class="parametername">prefix</span></td>
      <td><p>Letter to underline as a hotkey prefix</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="../FarPoint.Win/FarPoint.Win.VisualStyles.html">VisualStyles</a></td>
      <td><span class="parametername">style</span></td>
      <td><p>Visual style (XP theme)</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">mouseOver</span></td>
      <td><p>Whether the mouse is over the header</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">rightToLeft</span></td>
      <td><p>Whether to draw the header cell with a right-to-left orientation</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="FarPoint.Win.Spread.Appearance.html">Appearance</a></td>
      <td><span class="parametername">appearance</span></td>
      <td><p>Appearance settings</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a></td>
      <td><span class="parametername">textRotationAngle</span></td>
      <td><p>Text rotation angle</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="overrides">Overrides</h5>
<div><a class="xref" href="FarPoint.Win.Spread.CellType.ColumnHeaderRenderer.PaintHeader.html#FarPoint_Win_Spread_CellType_ColumnHeaderRenderer_PaintHeader_System_Drawing_Graphics_System_Drawing_Rectangle_System_Drawing_Rectangle_System_Drawing_Color_System_Drawing_Color_System_Drawing_Font_FarPoint_Win_HorizontalAlignment_FarPoint_Win_VerticalAlignment_System_Boolean_System_Boolean_System_String_System_String_FarPoint_Win_ButtonTextAlign_FarPoint_Win_TextOrientation_System_Boolean_System_Int32_System_Drawing_Color_System_Drawing_Color_System_Drawing_Image_System_Drawing_Image_System_Boolean_System_Drawing_Text_HotkeyPrefix_FarPoint_Win_VisualStyles_System_Boolean_System_Boolean_FarPoint_Win_Spread_Appearance_System_Double_">ColumnHeaderRenderer.PaintHeader(Graphics, Rectangle, Rectangle, Color, Color, Font, HorizontalAlignment, VerticalAlignment, bool, bool, string, string, ButtonTextAlign, TextOrientation, bool, int, Color, Color, Image, Image, bool, HotkeyPrefix, VisualStyles, bool, bool, Appearance, double)</a></div>
</div>
