GrapeCity MultiRow Windows Forms Documentation
Display Vertical Scroll Bar (TextBoxCell)

You can create a text box cell that allows the input of multiline text and has a vertical scroll bar. The text box cell scroll bar is displayed only when the cell is in an editable state.

Using the Designer

Use the following steps to create a text box cell that allows the input of multiline text and has a vertical scroll bar

  1. Select a text box cell where you need to display a vertical scroll bar (for example: textBoxCell1).
  2. Drag the cell and make its height about twice its current size.
  3. From the Properties window, select the ScrollBars property and choose Vertical from the drop-down list.
  4. From the Properties window, select the Style property and expand the properties by clicking the plus sign on the left.
  5. Select the Multiline property and choose True from the drop-down list.
  6. Select the TextAlign property and choose TopLeft from the drop-down list.
  7. Change the designer document window tab to Runtime.
  8. Input any value based on Input Line Break (TextBoxCell).

Using Code

The following code creates a text box cell that allows the input of multiline text and has a vertical scroll bar.

[VB]

Imports GrapeCity.Win.MultiRow

Dim template As New Template()
Dim textBoxCell1 As New TextBoxCell()

textBoxCell1.Name = "textBoxCell1"
textBoxCell1.ScrollBars = ScrollBars.Vertical
textBoxCell1.Size = New Size(80, 60)
textBoxCell1.Style.Multiline = MultiRowTriState.True
textBoxCell1.Style.TextAlign = MultiRowContentAlignment.TopLeft

GcMultiRow1.Template = Template.CreateGridTemplate(New Cell() { textBoxCell1 })
GcMultiRow1.RowCount = 10

[CS]

using GrapeCity.Win.MultiRow;

Template template = new Template();
TextBoxCell textBoxCell1 = new TextBoxCell();

textBoxCell1.Name = "textBoxCell1";
textBoxCell1.ScrollBars = ScrollBars.Vertical;
textBoxCell1.Size = new Size(80, 60);
textBoxCell1.Style.Multiline = MultiRowTriState.True;
textBoxCell1.Style.TextAlign = MultiRowContentAlignment.TopLeft;

gcMultiRow1.Template = Template.CreateGridTemplate(new Cell[] { textBoxCell1 });
gcMultiRow1.RowCount = 10;
See Also

 

 


Copyright © GrapeCity, inc. All rights reserved.

Support Options