Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

DataGrid.CaptionFont Property

Gets or sets the font of the grid's caption.

[Visual Basic]
Public Property CaptionFont As Font
public Font CaptionFont {get; set;}
public: __property Font* get_CaptionFont();
public: __property void set_CaptionFont(Font*);
public function get CaptionFont() : Font;
public function set CaptionFont(Font);

Property Value

A Font that represents the caption's font.


A Font encapsulates a Windows font and provides the methods for manipulating that font.


[Visual Basic] The following example sets the caption's font using a Font object.

[Visual Basic] 
Private Sub SetCaptionFont(ByRef myGrid As DataGrid, newFont As System.Drawing.Font)
    myGrid.CaptionFont = newFont
 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 | CaptionForeColor

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
© 2014 Microsoft. All rights reserved.