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

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

DataGridTableStyle.ResetForeColor メソッド

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

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

Public Sub ResetForeColor
Dim instance As DataGridTableStyle

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

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

使用例使用例
Private Sub BtnSetForeColor_Click(ByVal
 sender As Object, ByVal
 e As EventArgs)
    ' Set the foreground color of table.
    myDataGridTableStyle.ForeColor = Color.Blue
    myDataGrid.TableStyles.Add(myDataGridTableStyle)
End Sub 'BtnSetForeColor_Click
      
Private Sub BtnResetForeColor_Click(ByVal
 sender As Object, ByVal
 e As EventArgs)
    ' Reset the foreground color of table to its default value.
    myDataGridTableStyle.ResetForeColor()
End Sub 'BtnResetForeColor_Click
 private void BtnSetForeColor_Click(Object sender,
 EventArgs e)
 {
    // Set the foreground color of table.
    myDataGridTableStyle.ForeColor=Color.Blue;
    myDataGrid.TableStyles.Add(myDataGridTableStyle);
 }
private void BtnResetForeColor_Click(Object
 sender, EventArgs e)
{
   // Reset the foreground color of table to its default value.
   myDataGridTableStyle.ResetForeColor();
}
private:
   void BtnSetForeColor_Click( Object^ /*sender*/, EventArgs^
 /*e*/ )
   {
      // Set the foreground color of table.
      myDataGridTableStyle->ForeColor = Color::Blue;
      myDataGrid->TableStyles->Add( myDataGridTableStyle );
   }

   void BtnResetForeColor_Click( Object^ /*sender*/, EventArgs^
 /*e*/ )
   {
      // Reset the foreground color of table to its default value.
      myDataGridTableStyle->ResetForeColor();
   }
void BtnSetForeColor_Click(Object sender, EventArgs e)
{
    // Set the foreground color of table.
    myDataGridTableStyle.set_ForeColor(Color.get_Blue());
    myDataGrid.get_TableStyles().Add(myDataGridTableStyle);
} //BtnSetForeColor_Click

void BtnResetForeColor_Click(Object sender, EventArgs e)
{
    // Reset the foreground color of table to its default value.
    myDataGridTableStyle.ResetForeColor();
} //BtnResetForeColor_Click
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



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

辞書ショートカット

すべての辞書の索引

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

   

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



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

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

©2025 GRAS Group, Inc.RSS