# FarPoint.Win.Spread.CellType.ListBoxCellType.DoPaint

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="FarPoint_Win_Spread_CellType_ListBoxCellType_DoPaint_" data-uid="FarPoint.Win.Spread.CellType.ListBoxCellType.DoPaint*">DoPaint Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="FarPoint_Win_Spread_CellType_ListBoxCellType_DoPaint_" data-uid="FarPoint.Win.Spread.CellType.ListBoxCellType.DoPaint*"></a>
<h4 id="FarPoint_Win_Spread_CellType_ListBoxCellType_DoPaint_System_Drawing_Graphics_System_Drawing_Rectangle_System_Drawing_Color_System_Drawing_Color_System_Drawing_Font_FarPoint_Win_HorizontalAlignment_FarPoint_Win_VerticalAlignment_System_Collections_ArrayList_System_Array_System_Boolean_System_Windows_Forms_ImageList_System_Int32_System_Boolean_System_Windows_Forms_SelectionMode_" data-uid="FarPoint.Win.Spread.CellType.ListBoxCellType.DoPaint(System.Drawing.Graphics,System.Drawing.Rectangle,System.Drawing.Color,System.Drawing.Color,System.Drawing.Font,FarPoint.Win.HorizontalAlignment,FarPoint.Win.VerticalAlignment,System.Collections.ArrayList,System.Array,System.Boolean,System.Windows.Forms.ImageList,System.Int32,System.Boolean,System.Windows.Forms.SelectionMode)">DoPaint(Graphics, Rectangle, Color, Color, Font, HorizontalAlignment, VerticalAlignment, ArrayList, Array, bool, ImageList, int, bool, SelectionMode)</h4>
<div class="markdown level1 summary"><p>Paints the list box cell.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static void DoPaint(Graphics g, Rectangle r, Color backColor, Color foreColor, Font font, HorizontalAlignment halign, VerticalAlignment valign, ArrayList radioList, Array selectedItems, bool bLocked, ImageList imgList, int itemHeight, bool rightToLeft, SelectionMode selMode)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Sub DoPaint(g As Graphics, r As Rectangle, backColor As Color, foreColor As Color, font As Font, halign As HorizontalAlignment, valign As VerticalAlignment, radioList As ArrayList, selectedItems As Array, bLocked As Boolean, imgList As ImageList, itemHeight As Integer, rightToLeft As Boolean, selMode As SelectionMode)</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 column 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>Rectangle around the column 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">backColor</span></td>
      <td><p>Background color for the column 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 column 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 column 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 column 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 column header cell</p>
</td>
    </tr>
    <tr>
      <td><span class="xref">ArrayList</span></td>
      <td><span class="parametername">radioList</span></td>
      <td><p>List of items</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.array">Array</a></td>
      <td><span class="parametername">selectedItems</span></td>
      <td><p>Selected items from the list</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 list is locked</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.forms.imagelist">ImageList</a></td>
      <td><span class="parametername">imgList</span></td>
      <td><p>List of pictures that correspond with the items</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">itemHeight</span></td>
      <td><p>Height in pixels of each item</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 object with a right-to-left orientation</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.forms.selectionmode">SelectionMode</a></td>
      <td><span class="parametername">selMode</span></td>
      <td><p>The selection mode indicates how the specified <a class="xref" href="FarPoint.Win.Spread.CellType.ListBoxCellType.html">ListBoxCellType</a> control is selected.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="FarPoint_Win_Spread_CellType_ListBoxCellType_DoPaint_" data-uid="FarPoint.Win.Spread.CellType.ListBoxCellType.DoPaint*"></a>
<h4 id="FarPoint_Win_Spread_CellType_ListBoxCellType_DoPaint_System_Drawing_Graphics_System_Drawing_Rectangle_System_Drawing_Color_System_Drawing_Color_System_Drawing_Font_FarPoint_Win_HorizontalAlignment_FarPoint_Win_VerticalAlignment_System_Collections_ArrayList_System_Int32_System_Boolean_System_Windows_Forms_ImageList_System_Int32_System_Boolean_" data-uid="FarPoint.Win.Spread.CellType.ListBoxCellType.DoPaint(System.Drawing.Graphics,System.Drawing.Rectangle,System.Drawing.Color,System.Drawing.Color,System.Drawing.Font,FarPoint.Win.HorizontalAlignment,FarPoint.Win.VerticalAlignment,System.Collections.ArrayList,System.Int32,System.Boolean,System.Windows.Forms.ImageList,System.Int32,System.Boolean)">DoPaint(Graphics, Rectangle, Color, Color, Font, HorizontalAlignment, VerticalAlignment, ArrayList, int, bool, ImageList, int, bool)</h4>
<div class="markdown level1 summary"><p>Paints the list box cell.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static void DoPaint(Graphics g, Rectangle r, Color backColor, Color foreColor, Font font, HorizontalAlignment halign, VerticalAlignment valign, ArrayList radioList, int selectedItem, bool bLocked, ImageList imgList, int itemHeight, bool rightToLeft)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Sub DoPaint(g As Graphics, r As Rectangle, backColor As Color, foreColor As Color, font As Font, halign As HorizontalAlignment, valign As VerticalAlignment, radioList As ArrayList, selectedItem As Integer, bLocked As Boolean, imgList As ImageList, itemHeight As Integer, rightToLeft As Boolean)</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 column 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>Rectangle around the column 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">backColor</span></td>
      <td><p>Background color for the column 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 column 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 column 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 column 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 column header cell</p>
</td>
    </tr>
    <tr>
      <td><span class="xref">ArrayList</span></td>
      <td><span class="parametername">radioList</span></td>
      <td><p>List of items</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">selectedItem</span></td>
      <td><p>Selected item from the list</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 list is locked</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.forms.imagelist">ImageList</a></td>
      <td><span class="parametername">imgList</span></td>
      <td><p>List of pictures that correspond with the items</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">itemHeight</span></td>
      <td><p>Height in pixels of each item</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 object with a right-to-left orientation</p>
</td>
    </tr>
  </tbody>
</table>


<a id="FarPoint_Win_Spread_CellType_ListBoxCellType_DoPaint_" data-uid="FarPoint.Win.Spread.CellType.ListBoxCellType.DoPaint*"></a>
<h4 id="FarPoint_Win_Spread_CellType_ListBoxCellType_DoPaint_System_Drawing_Graphics_System_Drawing_Rectangle_System_Drawing_Color_System_Drawing_Color_System_Drawing_Font_FarPoint_Win_HorizontalAlignment_FarPoint_Win_VerticalAlignment_System_Collections_ArrayList_System_Int32_System_Boolean_System_Windows_Forms_ImageList_System_Int32_System_Boolean_System_Windows_Forms_SelectionMode_" data-uid="FarPoint.Win.Spread.CellType.ListBoxCellType.DoPaint(System.Drawing.Graphics,System.Drawing.Rectangle,System.Drawing.Color,System.Drawing.Color,System.Drawing.Font,FarPoint.Win.HorizontalAlignment,FarPoint.Win.VerticalAlignment,System.Collections.ArrayList,System.Int32,System.Boolean,System.Windows.Forms.ImageList,System.Int32,System.Boolean,System.Windows.Forms.SelectionMode)">DoPaint(Graphics, Rectangle, Color, Color, Font, HorizontalAlignment, VerticalAlignment, ArrayList, int, bool, ImageList, int, bool, SelectionMode)</h4>
<div class="markdown level1 summary"><p>Paints the list box cell.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static void DoPaint(Graphics g, Rectangle r, Color backColor, Color foreColor, Font font, HorizontalAlignment halign, VerticalAlignment valign, ArrayList radioList, int selectedItem, bool bLocked, ImageList imgList, int itemHeight, bool rightToLeft, SelectionMode selMode)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Sub DoPaint(g As Graphics, r As Rectangle, backColor As Color, foreColor As Color, font As Font, halign As HorizontalAlignment, valign As VerticalAlignment, radioList As ArrayList, selectedItem As Integer, bLocked As Boolean, imgList As ImageList, itemHeight As Integer, rightToLeft As Boolean, selMode As SelectionMode)</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 column 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>Rectangle around the column 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">backColor</span></td>
      <td><p>Background color for the column 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 column 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 column 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 column 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 column header cell</p>
</td>
    </tr>
    <tr>
      <td><span class="xref">ArrayList</span></td>
      <td><span class="parametername">radioList</span></td>
      <td><p>List of items</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">selectedItem</span></td>
      <td><p>Selected item from the list</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 list is locked</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.forms.imagelist">ImageList</a></td>
      <td><span class="parametername">imgList</span></td>
      <td><p>List of pictures that correspond with the items</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">itemHeight</span></td>
      <td><p>Height in pixels of each item</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 object with a right-to-left orientation</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.forms.selectionmode">SelectionMode</a></td>
      <td><span class="parametername">selMode</span></td>
      <td><p>SelectionMode of ListBox</p>
</td>
    </tr>
  </tbody>
</table>
</div>
