DataGrid.CaptionText プロパティ
グリッドのウィンドウ キャプションのテキストを取得または設定します。
Public Property CaptionText As String
[C#]
public string CaptionText {get; set;}
[C++]
public: __property String* get_CaptionText();public: __property void set_CaptionText(String*);
[JScript]
public function get CaptionText() : String;public function set CaptionText(String);
プロパティ値
グリッドのウィンドウ キャプションとして表示される文字列。既定値は空の文字列 ("") です。
使用例
[Visual Basic, C#, C++] System.Windows.Forms.DataGrid のキャプションを設定する例を次に示します。
If DataGrid1.CaptionText = "" Then
DataGrid1.CaptionText = "Microsoft DataGrid"
End If
[C#]
if(dataGrid1.CaptionText == "")
dataGrid1.CaptionText = "Microsoft DataGrid";
[C++]
if(dataGrid1->CaptionText->Equals(S""))
dataGrid1->CaptionText = S"Microsoft DataGrid";
[JScript] JScript のサンプルはありません。Visual Basic、C#、および C++ のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン をクリックします。
必要条件
プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ
参照
DataGrid クラス | DataGrid メンバ | System.Windows.Forms 名前空間 | CaptionVisible | CaptionForeColor | CaptionFont | CaptionBackColor