GanttView for WinForms
前景色
スタイルと外観 > 前景色

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#
コードのコピー
//グリッドの前景色を設定します。
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#
コードのコピー
// 固定セルの前景色を設定します。
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#
コードのコピー
//強調表示されたセルの前景色を設定します。
c1GanttView1.HighlightForeColor = Color.Red;