GrapeCity MultiRow Windows Forms Documentation
Text Indent

You can show text in a hierarchical level display by using the indent. You can specify the indent in pixels using the CellStyle.TextIndent property. The Styles in the Cell Types can be used to determine whether the specific cell type supports the indent.

Text Indent

 Using the Designer

  1. Select the cells for which the indent needs to be set (for example: textBoxCell1).
  2. Input the desired string in the Value property in the Properties window (for example: ABC).
  3. Set the textBoxCell1.Style.TextIndent property to 10 in the Properties window.

Using Code

This example sets the text indent.

[VB]

Imports GrapeCity.Win.MultiRow

GcMultiRow1.ViewMode = ViewMode.Display
GcMultiRow1.AllowUserToAddRows = False
GcMultiRow1.Template = Template.CreateGridTemplate(New Cell() {New TextBoxCell()})
GcMultiRow1.RowCount = 3
GcMultiRow1.Rows(0).Cells(0).Value = "Level1"
GcMultiRow1.Rows(0).Cells(0).Style.TextIndent = 0
GcMultiRow1.Rows(1).Cells(0).Value = "Level2"
GcMultiRow1.Rows(1).Cells(0).Style.TextIndent = 10
GcMultiRow1.Rows(2).Cells(0).Value = "Level3"
GcMultiRow1.Rows(2).Cells(0).Style.TextIndent = 20

[CS]

using GrapeCity.Win.MultiRow;

gcMultiRow1.ViewMode = ViewMode.Display;
gcMultiRow1.AllowUserToAddRows = false;
gcMultiRow1.Template = Template.CreateGridTemplate(new Cell[] {new TextBoxCell()});
gcMultiRow1.RowCount = 3;
gcMultiRow1.Rows[0].Cells[0].Value = "Level1";
gcMultiRow1.Rows[0].Cells[0].Style.TextIndent = 0;
gcMultiRow1.Rows[1].Cells[0].Value = "Level2";
gcMultiRow1.Rows[1].Cells[0].Style.TextIndent = 10;
gcMultiRow1.Rows[2].Cells[0].Value = "Level3";
gcMultiRow1.Rows[2].Cells[0].Style.TextIndent = 20;
See Also

 

 


Copyright © GrapeCity, inc. All rights reserved.

Support Options