DataGrid.ResetHeaderForeColor メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > DataGrid.ResetHeaderForeColor メソッドの意味・解説 

DataGrid.ResetHeaderForeColor メソッド

HeaderForeColor プロパティ既定値リセットします。

名前空間: System.Windows.Forms
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)
構文構文

Public Sub ResetHeaderForeColor
Dim instance As DataGrid

instance.ResetHeaderForeColor
public void ResetHeaderForeColor ()
public:
void ResetHeaderForeColor ()
public void ResetHeaderForeColor ()
public function ResetHeaderForeColor ()
解説解説

通常、System.Windows.Forms.DataGrid のデザイナ作成する場合、または System.Windows.Forms.DataGrid組み込まれている独自のコントロール作成する場合に、このメソッド使用します。ShouldSerializeHeaderForeColor メソッド使用してプロパティの値が既定値から変更されたかどうかを判断します

使用例使用例
Private Sub button3_Click(ByVal
 sender As Object, ByVal
 e As EventArgs) Handles button3.Click
    Dim myColorDialog As New
 ColorDialog()
    ' Disable selecting a custom color.
    myColorDialog.AllowFullOpen = False
    ' Enable the help button.
    myColorDialog.ShowHelp = True
    ' Set the initial color to the current color.
    myColorDialog.Color = myDataGrid.HeaderForeColor
    ' Show color dialog box.
    myColorDialog.ShowDialog()
    ' Set the header foreground color.
    myDataGrid.HeaderForeColor = myColorDialog.Color
End Sub 'button3_Click

' Reset the header foregroundcolor.
Private Sub button4_Click(ByVal
 sender As Object, ByVal
 e As EventArgs) Handles button4.Click
    myDataGrid.ResetHeaderForeColor()
End Sub 'button4_Click

private void button3_Click(object sender, EventArgs
 e)
{
   ColorDialog myColorDialog = new ColorDialog();
   // Disable selecting a custom color.
   myColorDialog.AllowFullOpen = false ;
   // Enable the help button.
   myColorDialog.ShowHelp = true ;
   // Set the initial color to the current color.
   myColorDialog.Color = myDataGrid.HeaderForeColor;
   // Show color dialog box.
   myColorDialog.ShowDialog();
   // Set the header foreground color.
   myDataGrid.HeaderForeColor = myColorDialog.Color;
}
// Reset the header foregroundcolor.
private void button4_Click(object sender, EventArgs
 e)
{
   myDataGrid.ResetHeaderForeColor();
}
private:
   void button3_Click( Object^ /*sender*/, EventArgs^ /*e*/ )
   {
      ColorDialog^ myColorDialog = gcnew ColorDialog;

      // Disable selecting a custom color.
      myColorDialog->AllowFullOpen = false;

      // Enable the help button.
      myColorDialog->ShowHelp = true;

      // Set the initial color to the current color.
      myColorDialog->Color = myDataGrid->HeaderForeColor;

      // Show color dialog box.
      myColorDialog->ShowDialog();

      // Set the header foreground color.
      myDataGrid->HeaderForeColor = myColorDialog->Color;
   }

   // Reset the header foregroundcolor.
   void button4_Click( Object^ /*sender*/, EventArgs^ /*e*/ )
   {
      myDataGrid->ResetHeaderForeColor();
   }
private void button3_Click(Object sender, EventArgs
 e)
{
    ColorDialog myColorDialog = new ColorDialog();
   
    // Disable selecting a custom color.
    myColorDialog.set_AllowFullOpen(false);
    
    // Enable the help button.
    myColorDialog.set_ShowHelp(true);
    
    // Set the initial color to the current color.
    myColorDialog.set_Color(myDataGrid.get_HeaderForeColor());
    
    // Show color dialog box.
    myColorDialog.ShowDialog();
    
    // Set the header foreground color.
    myDataGrid.set_HeaderForeColor(myColorDialog.get_Color());
} //button3_Click

// Reset the header foregroundcolor.
private void button4_Click(Object sender, EventArgs
 e)
{
    myDataGrid.ResetHeaderForeColor();
} //button4_Click
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

DataGrid.ResetHeaderForeColor メソッドのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



DataGrid.ResetHeaderForeColor メソッドのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2024 Microsoft.All rights reserved.

©2024 GRAS Group, Inc.RSS