FlexGrid for WinForms
Adding Three-Dimensional Text to a Header Row
Show AllShow All
Hide AllHide All

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.

  1. Create a new style called 3DText.

    In the Designer

    • Open the C1FlexGrid Style Editor. For details on how to access the C1FlexGrid Style Editor, see Accessing the C1FlexGrid Style Editor.
    • Click Add to create a new style.
    • Double-click CustomStyle1, rename it 3DText, and press ENTER when finished.
    • Do not exit the C1FlexGrid Style Editor.

    In Code

    Add the following code to the Form_Load event:

    To write code in Visual Basic

    To write code in C#

  2. Set the TextEffect property to Raised.

    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

    To write code in C#

  3. Apply the style to the header row by adding the following code to the Form_Load event:

    To write code in Visual Basic

    To write code in C#

This topic illustrates the following:

The table should have a header with raised text similar to the following image.


 

 


Copyright © GrapeCity, inc. All rights reserved.

Product Support Forum |  Documentation Feedback