# FarPoint.Win.Spread.CellType.ColumnHeaderRenderer.PaintBackground

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="FarPoint_Win_Spread_CellType_ColumnHeaderRenderer_PaintBackground_" data-uid="FarPoint.Win.Spread.CellType.ColumnHeaderRenderer.PaintBackground*">PaintBackground Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="FarPoint_Win_Spread_CellType_ColumnHeaderRenderer_PaintBackground_" data-uid="FarPoint.Win.Spread.CellType.ColumnHeaderRenderer.PaintBackground*"></a>
<h4 id="FarPoint_Win_Spread_CellType_ColumnHeaderRenderer_PaintBackground_System_Drawing_Graphics_System_Boolean__System_Boolean_System_Boolean_System_Boolean_System_Drawing_Rectangle_System_Int32_System_Int32_FarPoint_Win_VisualStyles_System_Boolean_System_Drawing_Color_" data-uid="FarPoint.Win.Spread.CellType.ColumnHeaderRenderer.PaintBackground(System.Drawing.Graphics,System.Boolean@,System.Boolean,System.Boolean,System.Boolean,System.Drawing.Rectangle,System.Int32,System.Int32,FarPoint.Win.VisualStyles,System.Boolean,System.Drawing.Color)">PaintBackground(Graphics, ref bool, bool, bool, bool, Rectangle, int, int, VisualStyles, bool, Color)</h4>
<div class="markdown level1 summary"><p>Paints the background of the enhanced header cell.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">protected virtual void PaintBackground(Graphics g, ref bool useXpStyles, bool toscreen, bool pressed, bool focus, Rectangle r, int dpx, int dpy, VisualStyles style, bool rightToLeft, Color backColor)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Protected Overridable Sub PaintBackground(g As Graphics, ByRef useXpStyles As Boolean, toscreen As Boolean, pressed As Boolean, focus As Boolean, r As Rectangle, dpx As Integer, dpy As Integer, style As VisualStyles, rightToLeft As Boolean, backColor As Color)</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 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">useXpStyles</span></td>
      <td><p>Whether to use XP themes</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">toscreen</span></td>
      <td><p>Whether painting to the screen</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 in a pressed state</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 cell has focus</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>Boundary rectangle</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">dpx</span></td>
      <td><p>Integer number of resolution (DPI) along the x-axis</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">dpy</span></td>
      <td><p>Integer number of resolution (DPI) along the y-axis</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>Whether to turn on visual styles</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 drawing right to left</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>Cell background color</p>
</td>
    </tr>
  </tbody>
</table>
</div>
