# FarPoint.Win.FpButton.DoPaint

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="FarPoint_Win_FpButton_DoPaint_" data-uid="FarPoint.Win.FpButton.DoPaint*">DoPaint Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="FarPoint_Win_FpButton_DoPaint_" data-uid="FarPoint.Win.FpButton.DoPaint*"></a>
<h4 id="FarPoint_Win_FpButton_DoPaint_System_Drawing_Graphics_System_Drawing_Rectangle_System_Drawing_Color_System_Drawing_Color_System_Drawing_Font_FarPoint_Win_HorizontalAlignment_FarPoint_Win_VerticalAlignment_System_Boolean_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_Boolean_" data-uid="FarPoint.Win.FpButton.DoPaint(System.Drawing.Graphics,System.Drawing.Rectangle,System.Drawing.Color,System.Drawing.Color,System.Drawing.Font,FarPoint.Win.HorizontalAlignment,FarPoint.Win.VerticalAlignment,System.Boolean,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.Boolean)">DoPaint(Graphics, Rectangle, Color, Color, Font, HorizontalAlignment, VerticalAlignment, bool, bool, string, string, ButtonTextAlign, TextOrientation, bool, int, Color, Color, Image, Image, bool, bool)</h4>
<div class="markdown level1 summary"><p>Paints the cell with the button.</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, bool pressed, bool focus, string text, string textDown, ButtonTextAlign nAlign, TextOrientation textOrientation, bool wordWrap, int shadowSize, Color darkColor, Color lightColor, Image pictUp, Image pictDown, bool bLocked, 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, pressed As Boolean, focus 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, 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>GDI+ graphics surface</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>Image rectangle</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</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>Foreground (text) color</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 text</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="FarPoint.Win.HorizontalAlignment.html">HorizontalAlignment</a></td>
      <td><span class="parametername">halign</span></td>
      <td><p>Horizontal alignment</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="FarPoint.Win.VerticalAlignment.html">VerticalAlignment</a></td>
      <td><span class="parametername">valign</span></td>
      <td><p>Vertical alignment</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 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">focus</span></td>
      <td><p>Whether it is in focus</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 of button when not 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">textDown</span></td>
      <td><p>Text of pressed button</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="FarPoint.Win.ButtonTextAlign.html">ButtonTextAlign</a></td>
      <td><span class="parametername">nAlign</span></td>
      <td><p>Alignment of text with respect to image in button</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="FarPoint.Win.TextOrientation.html">TextOrientation</a></td>
      <td><span class="parametername">textOrientation</span></td>
      <td><p>Orientation of 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">wordWrap</span></td>
      <td><p>Whether text wraps 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 of the shadow around the button</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>Color of the shadow (dark part of button)</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>Color of light part of button</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 (image) when 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 (image) when 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 cell is locked</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 right-to-left layout</p>
</td>
    </tr>
  </tbody>
</table>


<a id="FarPoint_Win_FpButton_DoPaint_" data-uid="FarPoint.Win.FpButton.DoPaint*"></a>
<h4 id="FarPoint_Win_FpButton_DoPaint_System_Drawing_Graphics_System_Drawing_Rectangle_System_Drawing_Color_System_Drawing_Color_System_Drawing_Font_FarPoint_Win_HorizontalAlignment_FarPoint_Win_VerticalAlignment_System_Boolean_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_VisualStyles_System_Boolean_" data-uid="FarPoint.Win.FpButton.DoPaint(System.Drawing.Graphics,System.Drawing.Rectangle,System.Drawing.Color,System.Drawing.Color,System.Drawing.Font,FarPoint.Win.HorizontalAlignment,FarPoint.Win.VerticalAlignment,System.Boolean,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.VisualStyles,System.Boolean)">DoPaint(Graphics, Rectangle, Color, Color, Font, HorizontalAlignment, VerticalAlignment, bool, bool, string, string, ButtonTextAlign, TextOrientation, bool, int, Color, Color, Image, Image, bool, HotkeyPrefix, VisualStyles, bool)</h4>
<div class="markdown level1 summary"><p>Paints the cell with the button.</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, bool pressed, bool focus, string text, string textDown, ButtonTextAlign nAlign, TextOrientation textOrientation, bool wordWrap, int shadowSize, Color darkColor, Color lightColor, Image pictUp, Image pictDown, bool bLocked, HotkeyPrefix prefix, VisualStyles style, bool mouseOver)</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, pressed As Boolean, focus 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, style As VisualStyles, mouseOver 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>GDI+ graphics surface</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>Image rectangle</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</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>Foreground (text) color</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 text</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="FarPoint.Win.HorizontalAlignment.html">HorizontalAlignment</a></td>
      <td><span class="parametername">halign</span></td>
      <td><p>Horizontal alignment</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="FarPoint.Win.VerticalAlignment.html">VerticalAlignment</a></td>
      <td><span class="parametername">valign</span></td>
      <td><p>Vertical alignment</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 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">focus</span></td>
      <td><p>Whether it is in focus</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 of button when not 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">textDown</span></td>
      <td><p>Text of pressed button</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="FarPoint.Win.ButtonTextAlign.html">ButtonTextAlign</a></td>
      <td><span class="parametername">nAlign</span></td>
      <td><p>Alignment of text with respect to image in button</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="FarPoint.Win.TextOrientation.html">TextOrientation</a></td>
      <td><span class="parametername">textOrientation</span></td>
      <td><p>Orientation of 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">wordWrap</span></td>
      <td><p>Whether text wraps 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 of the shadow around the button</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>Color of the shadow (dark part of button)</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>Color of light part of button</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 (image) when 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 (image) when 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 cell 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>Whether the ampersand character underlines text</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="FarPoint.Win.VisualStyles.html">VisualStyles</a></td>
      <td><span class="parametername">style</span></td>
      <td><p>Determines the button style</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">mouseOver</span></td>
      <td><p>True if mouse is over button</p>
</td>
    </tr>
  </tbody>
</table>


<a id="FarPoint_Win_FpButton_DoPaint_" data-uid="FarPoint.Win.FpButton.DoPaint*"></a>
<h4 id="FarPoint_Win_FpButton_DoPaint_FarPoint_Win_FpButtonPaintArgs_" data-uid="FarPoint.Win.FpButton.DoPaint(FarPoint.Win.FpButtonPaintArgs)">DoPaint(FpButtonPaintArgs)</h4>
<div class="markdown level1 summary"><p>Paints.</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(FpButtonPaintArgs args)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Sub DoPaint(args As FpButtonPaintArgs)</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="FarPoint.Win.FpButtonPaintArgs.html">FpButtonPaintArgs</a></td>
      <td><span class="parametername">args</span></td>
      <td><p>Paint arguments</p>
</td>
    </tr>
  </tbody>
</table>
</div>
