# C1.Win.TrueDBGrid.GridRenderer.DrawBorder

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Win_TrueDBGrid_GridRenderer_DrawBorder_" data-uid="C1.Win.TrueDBGrid.GridRenderer.DrawBorder*">DrawBorder Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Win_TrueDBGrid_GridRenderer_DrawBorder_" data-uid="C1.Win.TrueDBGrid.GridRenderer.DrawBorder*"></a>
<h4 id="C1_Win_TrueDBGrid_GridRenderer_DrawBorder_System_Drawing_Graphics_System_Drawing_Rectangle_System_Windows_Forms_BorderStyle_System_Drawing_Color_" data-uid="C1.Win.TrueDBGrid.GridRenderer.DrawBorder(System.Drawing.Graphics,System.Drawing.Rectangle,System.Windows.Forms.BorderStyle,System.Drawing.Color)">DrawBorder(Graphics, Rectangle, BorderStyle, Color)</h4>
<div class="markdown level1 summary"><p>Draws the border.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static bool DrawBorder(Graphics g, Rectangle r, BorderStyle borderStyle, Color borderColor)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function DrawBorder(g As Graphics, r As Rectangle, borderStyle As BorderStyle, borderColor As Color) 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>A <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.graphics">Graphics</a> object.</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>Border rectangle area.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.forms.borderstyle">BorderStyle</a></td>
      <td><span class="parametername">borderStyle</span></td>
      <td><p>Border style.</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">borderColor</span></td>
      <td><p>Border color.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><p>Whether the border needs to be painted.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Win_TrueDBGrid_GridRenderer_DrawBorder_" data-uid="C1.Win.TrueDBGrid.GridRenderer.DrawBorder*"></a>
<h4 id="C1_Win_TrueDBGrid_GridRenderer_DrawBorder_System_Drawing_Graphics_System_Drawing_Rectangle_" data-uid="C1.Win.TrueDBGrid.GridRenderer.DrawBorder(System.Drawing.Graphics,System.Drawing.Rectangle)">DrawBorder(Graphics, Rectangle)</h4>
<div class="markdown level1 summary"><p>Draws the border.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public abstract bool DrawBorder(Graphics g, Rectangle r)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public MustOverride Function DrawBorder(g As Graphics, r As Rectangle) 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>A <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.graphics">Graphics</a> object.</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>Border rectangle area.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><p>Whether the border needs to be painted.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
