# C1.Win.FlexGrid.GridScrollBarAnnotation.-ctor

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Win_FlexGrid_GridScrollBarAnnotation__ctor_" data-uid="C1.Win.FlexGrid.GridScrollBarAnnotation.#ctor*">GridScrollBarAnnotation Constructor
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Win_FlexGrid_GridScrollBarAnnotation__ctor_" data-uid="C1.Win.FlexGrid.GridScrollBarAnnotation.#ctor*"></a>
<h4 id="C1_Win_FlexGrid_GridScrollBarAnnotation__ctor_System_Int32_C1_Win_FlexGrid_ScrollBarAnnotationType_System_String_System_Double_System_Nullable_System_Drawing_Color__System_Windows_Forms_HorizontalAlignment_System_Int32_System_Int32_" data-uid="C1.Win.FlexGrid.GridScrollBarAnnotation.#ctor(System.Int32,C1.Win.FlexGrid.ScrollBarAnnotationType,System.String,System.Double,System.Nullable{System.Drawing.Color},System.Windows.Forms.HorizontalAlignment,System.Int32,System.Int32)">GridScrollBarAnnotation(int, ScrollBarAnnotationType, string, double, Color?, HorizontalAlignment, int, int)</h4>
<div class="markdown level1 summary"><p>Creates grid scrollbar annotation instance.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public GridScrollBarAnnotation(int row, ScrollBarAnnotationType scrollBarAnnotationType, string text, double position, Color? color = null, HorizontalAlignment alignment = HorizontalAlignment.Center, int width = 100, int height = 2)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(row As Integer, scrollBarAnnotationType As ScrollBarAnnotationType, text As String, position As Double, Optional color As Color? = Nothing, Optional alignment As HorizontalAlignment = HorizontalAlignment.Center, Optional width As Integer = 100, Optional height As Integer = 2)</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.int32">int</a></td>
      <td><span class="parametername">row</span></td>
      <td><p>Grid row associated with annotation.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Win.FlexGrid.ScrollBarAnnotationType.html">ScrollBarAnnotationType</a></td>
      <td><span class="parametername">scrollBarAnnotationType</span></td>
      <td><p>Annotation type.</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>Annotation text.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a></td>
      <td><span class="parametername">position</span></td>
      <td><p>Annotation vertical position in scrollbar.</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">color</span></td>
      <td><p>Annotation color.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.forms.horizontalalignment">HorizontalAlignment</a></td>
      <td><span class="parametername">alignment</span></td>
      <td><p>Annotation horizontal alignment in scrollbar.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">width</span></td>
      <td><p>Annotation width.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">height</span></td>
      <td><p>Annotation height.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
