ComponentOne GanttView for WinForms
Appearance and Styling / ForeColor
In This Topic
    ForeColor
    In This Topic

    You can easily change the fore color of the grid, highlighted cell, and even the fixed cells. This section discusses how you can customize the fore color of various elements in the GanttView.

    Displays customized fore color in the GanttView.

    Set Fore Color of Grid

    You can set the fore color of the entire grid by using the GridForeColor property of the C1GanttView class.

    Below code snippet shows how you can set the fore color of the entire grid in the GanttView.

    C#
    Copy Code
    //Set fore color of the grid
    c1GanttView1.GridForeColor = Color.DarkGreen;
    

    Set fore Color of Fixed cells

    To set the fore color of the fixed cells, use the FixedForeColor property of the C1GanttView class.

    Below code snippet shows how you can set the fore color of the fixed cells.

    C#
    Copy Code
    //Set fore color of the fixed cells 
    c1GanttView1.FixedForeColor = Color.DarkBlue;
    

    Set Fore Color of Highlighted cell

    To set the fore color of the highlighted cell in the grid, use the HighlightForeColor property of the C1GanttView class.

    Use the below code snippet to set the fore color of the highlighted cell.

    C#
    Copy Code
    //Set fore color of the highlighted cell
    c1GanttView1.HighlightForeColor = Color.Red;