# C1.Win.FlexGrid.OwnerDrawOutlineButtonEventArgs.DrawOutlineButton

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Win_FlexGrid_OwnerDrawOutlineButtonEventArgs_DrawOutlineButton_" data-uid="C1.Win.FlexGrid.OwnerDrawOutlineButtonEventArgs.DrawOutlineButton*">DrawOutlineButton Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Win_FlexGrid_OwnerDrawOutlineButtonEventArgs_DrawOutlineButton_" data-uid="C1.Win.FlexGrid.OwnerDrawOutlineButtonEventArgs.DrawOutlineButton*"></a>
<h4 id="C1_Win_FlexGrid_OwnerDrawOutlineButtonEventArgs_DrawOutlineButton_C1_Win_FlexGrid_DrawCellFlags_" data-uid="C1.Win.FlexGrid.OwnerDrawOutlineButtonEventArgs.DrawOutlineButton(C1.Win.FlexGrid.DrawCellFlags)">DrawOutlineButton(DrawCellFlags)</h4>
<div class="markdown level1 summary"><p>Causes the grid to paint parts of the outline button (background, foreground, border, etc.)</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void DrawOutlineButton(DrawCellFlags flags)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub DrawOutlineButton(flags As DrawCellFlags)</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="C1.Win.FlexGrid.DrawCellFlags.html">DrawCellFlags</a></td>
      <td><span class="parametername">flags</span></td>
      <td><p><a class="xref" href="C1.Win.FlexGrid.DrawCellFlags.html">DrawCellFlags</a> that specifies the parts of the outline button.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_Win_FlexGrid_OwnerDrawOutlineButtonEventArgs_DrawOutlineButton_C1_Win_FlexGrid_DrawCellFlags__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>This method is typically called in <span class="xref">C1.Win.FlexGrid.C1FlexGridBase.DrawOutlineButton(System.Drawing.Graphics,System.Int32,System.Int32,C1.Win.FlexGrid.Util.Styles.Style,System.Drawing.Rectangle,System.String,System.Drawing.Image,C1.Win.FlexGrid.DrawCellFlags,C1.Win.FlexGrid.DrawColorMode)</span> handlers when the code
intends to draw some elements of the outline button but not everything.</p>
<p>For example, the code may want to draw a custom border only. In this case, it could call
<b>e.DrawOutlineButton(DrawCellFlags.Background | DrawCellFlags.Content)</b> to draw the cell background and content, 
and later draw the custom border.</p>
<p>If the owner-draw code draws the entire outline button (including the background), then there's no need to call 
<b>e.DrawOutlineButton</b> at all.</p>
</div>


<a id="C1_Win_FlexGrid_OwnerDrawOutlineButtonEventArgs_DrawOutlineButton_" data-uid="C1.Win.FlexGrid.OwnerDrawOutlineButtonEventArgs.DrawOutlineButton*"></a>
<h4 id="C1_Win_FlexGrid_OwnerDrawOutlineButtonEventArgs_DrawOutlineButton" data-uid="C1.Win.FlexGrid.OwnerDrawOutlineButtonEventArgs.DrawOutlineButton">DrawOutlineButton()</h4>
<div class="markdown level1 summary"><p>Causes the grid to paint the whole outline button.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void DrawOutlineButton()</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub DrawOutlineButton()</code></pre>
</div>
</div>
