# FarPoint.Win.Spread.CellType.GradientHeaderRenderer.DrawHeader

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="FarPoint_Win_Spread_CellType_GradientHeaderRenderer_DrawHeader_" data-uid="FarPoint.Win.Spread.CellType.GradientHeaderRenderer.DrawHeader*">DrawHeader Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="FarPoint_Win_Spread_CellType_GradientHeaderRenderer_DrawHeader_" data-uid="FarPoint.Win.Spread.CellType.GradientHeaderRenderer.DrawHeader*"></a>
<h4 id="FarPoint_Win_Spread_CellType_GradientHeaderRenderer_DrawHeader_System_Drawing_Graphics_System_Drawing_Rectangle_System_Drawing_Rectangle_System_Drawing_Color_System_Drawing_Color_System_Drawing_Color_System_Drawing_Color_System_Drawing_Drawing2D_LinearGradientMode_System_Drawing_Color_System_Drawing_Font_FarPoint_Win_HorizontalAlignment_FarPoint_Win_VerticalAlignment_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_Spread_Appearance_" data-uid="FarPoint.Win.Spread.CellType.GradientHeaderRenderer.DrawHeader(System.Drawing.Graphics,System.Drawing.Rectangle,System.Drawing.Rectangle,System.Drawing.Color,System.Drawing.Color,System.Drawing.Color,System.Drawing.Color,System.Drawing.Drawing2D.LinearGradientMode,System.Drawing.Color,System.Drawing.Font,FarPoint.Win.HorizontalAlignment,FarPoint.Win.VerticalAlignment,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.Spread.Appearance)">DrawHeader(Graphics, Rectangle, Rectangle, Color, Color, Color, Color, LinearGradientMode, Color, Font, HorizontalAlignment, VerticalAlignment, bool, string, string, ButtonTextAlign, TextOrientation, bool, int, Color, Color, Image, Image, bool, HotkeyPrefix, Appearance)</h4>
<div class="markdown level1 summary"><p>Paints the gradient 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 void DrawHeader(Graphics g, Rectangle r, Rectangle rectTextIn, Color topColor, Color bottomColor, Color activeTopColor, Color activeBottomColor, LinearGradientMode mode, Color foreColor, Font font, HorizontalAlignment halign, VerticalAlignment valign, bool pressed, string text, string textDown, ButtonTextAlign nAlign, TextOrientation textOrientation, bool wordWrap, int shadowSize, Color darkColor, Color lightColor, Image pictUp, Image pictDown, bool bLocked, HotkeyPrefix prefix, Appearance appearance)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub DrawHeader(g As Graphics, r As Rectangle, rectTextIn As Rectangle, topColor As Color, bottomColor As Color, activeTopColor As Color, activeBottomColor As Color, mode As LinearGradientMode, foreColor As Color, font As Font, halign As HorizontalAlignment, valign As VerticalAlignment, pressed 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, appearance As Appearance)</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</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">topColor</span></td>
      <td><p>Color at the top of the gradient</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">bottomColor</span></td>
      <td><p>Color at the bottom of the gradient</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">activeTopColor</span></td>
      <td><p>Color at the top of the gradient when active</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">activeBottomColor</span></td>
      <td><p>Color at the bottom of the gradient when active</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.drawing2d.lineargradientmode">LinearGradientMode</a></td>
      <td><span class="parametername">mode</span></td>
      <td><p>Mode of the linear gradient</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>Color of the text</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 of the text</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 the text</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 the text</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>State of the header being pressed</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 to display in the header</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 to display in the header when pressed</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 text</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 to wrap text to multiple lines</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>Size in pixels 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">darkColor</span></td>
      <td><p>Dark color</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>Light color</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 button 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.Spread.Appearance.html">Appearance</a></td>
      <td><span class="parametername">appearance</span></td>
      <td><p>Appearance settings of the header cell</p>
</td>
    </tr>
  </tbody>
</table>


<a id="FarPoint_Win_Spread_CellType_GradientHeaderRenderer_DrawHeader_" data-uid="FarPoint.Win.Spread.CellType.GradientHeaderRenderer.DrawHeader*"></a>
<h4 id="FarPoint_Win_Spread_CellType_GradientHeaderRenderer_DrawHeader_System_Drawing_Graphics_System_Drawing_Rectangle_System_Drawing_Rectangle_System_Drawing_Color_System_Drawing_Color_System_Drawing_Color_System_Drawing_Color_System_Drawing_Drawing2D_LinearGradientMode_System_Drawing_Color_System_Drawing_Font_FarPoint_Win_HorizontalAlignment_FarPoint_Win_VerticalAlignment_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_Spread_Appearance_System_Single_" data-uid="FarPoint.Win.Spread.CellType.GradientHeaderRenderer.DrawHeader(System.Drawing.Graphics,System.Drawing.Rectangle,System.Drawing.Rectangle,System.Drawing.Color,System.Drawing.Color,System.Drawing.Color,System.Drawing.Color,System.Drawing.Drawing2D.LinearGradientMode,System.Drawing.Color,System.Drawing.Font,FarPoint.Win.HorizontalAlignment,FarPoint.Win.VerticalAlignment,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.Spread.Appearance,System.Single)">DrawHeader(Graphics, Rectangle, Rectangle, Color, Color, Color, Color, LinearGradientMode, Color, Font, HorizontalAlignment, VerticalAlignment, bool, string, string, ButtonTextAlign, TextOrientation, bool, int, Color, Color, Image, Image, bool, HotkeyPrefix, Appearance, float)</h4>
<div class="markdown level1 summary"><p>Paints the gradient 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 void DrawHeader(Graphics g, Rectangle r, Rectangle rectTextIn, Color topColor, Color bottomColor, Color activeTopColor, Color activeBottomColor, LinearGradientMode mode, Color foreColor, Font font, HorizontalAlignment halign, VerticalAlignment valign, bool pressed, string text, string textDown, ButtonTextAlign nAlign, TextOrientation textOrientation, bool wordWrap, int shadowSize, Color darkColor, Color lightColor, Image pictUp, Image pictDown, bool bLocked, HotkeyPrefix prefix, Appearance appearance, float zoomFactor)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub DrawHeader(g As Graphics, r As Rectangle, rectTextIn As Rectangle, topColor As Color, bottomColor As Color, activeTopColor As Color, activeBottomColor As Color, mode As LinearGradientMode, foreColor As Color, font As Font, halign As HorizontalAlignment, valign As VerticalAlignment, pressed 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, appearance As Appearance, zoomFactor As Single)</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</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">topColor</span></td>
      <td><p>Color at the top of the gradient</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">bottomColor</span></td>
      <td><p>Color at the bottom of the gradient</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">activeTopColor</span></td>
      <td><p>Color at the top of the gradient when active</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">activeBottomColor</span></td>
      <td><p>Color at the bottom of the gradient when active</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.drawing2d.lineargradientmode">LinearGradientMode</a></td>
      <td><span class="parametername">mode</span></td>
      <td><p>Mode of the linear gradient</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>Color of the text</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 of the text</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 the text</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 the text</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>State of the header being pressed</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 to display in the header</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 to display in the header when pressed</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 text</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 to wrap text to multiple lines</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>Size in pixels 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">darkColor</span></td>
      <td><p>Dark color</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>Light color</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 button 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.Spread.Appearance.html">Appearance</a></td>
      <td><span class="parametername">appearance</span></td>
      <td><p>Appearance settings of the header cell</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.single">float</a></td>
      <td><span class="parametername">zoomFactor</span></td>
      <td><p>Numeric value for scaling the display of the header cells</p>
</td>
    </tr>
  </tbody>
</table>
</div>
