This documentation is archived and is not being maintained.

DataGrid.CaptionForeColor Property

Gets or sets the foreground color of the caption area.

[Visual Basic]
Public Property CaptionForeColor As Color
public Color CaptionForeColor {get; set;}
public: __property Color get_CaptionForeColor();
public: __property void set_CaptionForeColor(Color);
public function get CaptionForeColor() : Color;
public function set CaptionForeColor(Color);

Property Value

A Color that represents the foreground color of the caption area. The default is ActiveCaptionText.


[Visual Basic] The following example sets the CaptionForeColor property of the System.Windows.Forms.DataGrid control.

[Visual Basic] 

 Private Sub SetCaptionForeClr(ByVal myGrid As DataGrid)
    myGrid.CaptionForeColor = System.Drawing.Color.Tomato
 End Sub

[C#, C++, JScript] No example is available for C#, C++, or JScript. To view a Visual Basic example, click the Language Filter button Language Filter in the upper-left corner of the page.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

DataGrid Class | DataGrid Members | System.Windows.Forms Namespace | CaptionBackColor | CaptionFont