FlexGrid for WinForms Task-Based Help > Adding Three-Dimensional Text to a Header Row |
To add three-dimensional text to the table's header row, set the TextEffect property to Raised for text with a shadow offset by one pixel to the right and below the text or Inset for text with a shadow offset by one pixel to the left and above the text. Setting the TextEffect property to Flat gives text no effect.
In the Designer
In Code
Add the following code to the Form_Load event:
To write code in Visual Basic
Visual Basic |
Copy Code
|
---|---|
Dim tdt As C1.Win.C1FlexGrid.CellStyle |
To write code in C#
C# |
Copy Code
|
---|---|
C1.Win.C1FlexGrid.CellStyle tdt = this.c1FlexGrid1.Styles.Add("3Dtext"); |
In the Designer
Locate the TextEffect property in the right pane and set it to Raised.
In Code
Add the following code to the Form_Load event:
To write code in Visual Basic
Visual Basic |
Copy Code
|
---|---|
tdt.TextEffect = C1.Win.C1FlexGrid.TextEffectEnum.Raised |
To write code in C#
C# |
Copy Code
|
---|---|
tdt.TextEffect = C1.Win.C1FlexGrid.TextEffectEnum.Raised; |
To write code in Visual Basic
Visual Basic |
Copy Code
|
---|---|
Me.C1FlexGrid1.Rows(0).Style = Me.C1FlexGrid1.Styles("3DText") |
To write code in C#
C# |
Copy Code
|
---|---|
this.c1FlexGrid1.Rows[0].Style = this.c1FlexGrid1.Styles["3DText"]; |
The table should have a header with raised text similar to the following image.