# C1.Win.InputPanel.InputComponent.ErrorText

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Win_InputPanel_InputComponent_ErrorText_" data-uid="C1.Win.InputPanel.InputComponent.ErrorText*">ErrorText Property
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Win_InputPanel_InputComponent_ErrorText_" data-uid="C1.Win.InputPanel.InputComponent.ErrorText*"></a>
<h4 id="C1_Win_InputPanel_InputComponent_ErrorText" data-uid="C1.Win.InputPanel.InputComponent.ErrorText">ErrorText</h4>
<div class="markdown level1 summary"><p>Gets or sets an error description string with optional HTML tags.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public virtual string ErrorText { get; set; }</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Overridable Property ErrorText As String</code></pre>
</div>
<h5 id="C1_Win_InputPanel_InputComponent_ErrorText_remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>Setting this property to a non-empty string causes the component 
to be highlighted. The message is displayed as a tooltip when the user 
moves the mouse over the component.</p>
<p>Setting this property to an empty string removes the higlight and
restores the original tooltip text (<a class="xref" href="C1.Win.InputPanel.InputComponent.ToolTipText.html#C1_Win_InputPanel_InputComponent_ToolTipText">ToolTipText</a>).</p>
</div>
<h5 id="C1_Win_InputPanel_InputComponent_ErrorText_examples">Examples</h5>
<p>The example below uses the <a class="xref" href="C1.Win.InputPanel.InputComponent.Validating.html">Validating</a> event to set the error
property on an <a class="xref" href="C1.Win.InputPanel.InputNumericBox.html">InputNumericBox</a> when the value entered is
not an even number.</p>
<pre><code class="lang-csharp">private void inputNumericBox1_Validating(object sender, CancelEventArgs e)
{
    if (inputNumericBox1.Value % 2 != 0)
    {
        inputNumericBox1.ErrorText = 
            "Please enter an &lt;b&gt;even&lt;/b&gt; number!";
        e.Cancel = true;
    }
    else
    {
        inputNumericBox1.ErrorText = string.Empty;
    }
}</code></pre>

</div>
