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

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

DataGridTableStyle.ResetBackColor メソッド

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

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

Public Sub ResetBackColor
Dim instance As DataGridTableStyle

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

通常、DataGridTableStyle のデザイナ作成する場合、または DataGridTableStyle組み込まれている独自のコントロール作成する場合に、このメソッド使用します

使用例使用例
Private Sub AddCustomColumnStyle()
   ' Set the TableStyle Mapping name.
   myTableStyle.MappingName = "customerTable"
   myTableStyle.BackColor = Color.Pink
   
   ' Set the ColumnStyle properties and add to TableStyle.
   myColumnStyle.MappingName = "Customers"
   myColumnStyle.HeaderText = "Customer Name"
   myColumnStyle.Width = 250
   myTableStyle.GridColumnStyles.Add(myColumnStyle)
   myDataGrid.TableStyles.Add(myTableStyle)
End Sub 'AddCustomColumnStyle


Private Sub myButton1_Click(sender As
 Object, e As EventArgs)
   ' Reset the background color.
   myTableStyle.ResetBackColor()
End Sub 'myButton1_Click
private void AddCustomColumnStyle()
{
   // Set the TableStyle Mapping name.
   myTableStyle.MappingName = "customerTable";
   myTableStyle.BackColor = Color.Pink;

   // Set the ColumnStyle properties and add to TableStyle.
   myColumnStyle.MappingName = "Customers";
   myColumnStyle.HeaderText = "Customer Name";
   myColumnStyle.Width = 250;
   myTableStyle.GridColumnStyles.Add(myColumnStyle);
   myDataGrid.TableStyles.Add(myTableStyle);
}

private void myButton1_Click(object sender,
 EventArgs e)
{
   // Reset the background color.
   myTableStyle.ResetBackColor();
}
private:
   void AddCustomColumnStyle()
   {
      // Set the TableStyle Mapping name.
      myTableStyle->MappingName = "customerTable";
      myTableStyle->BackColor = Color::Pink;
      
      // Set the ColumnStyle properties and add to TableStyle.
      myColumnStyle->MappingName = "Customers";
      myColumnStyle->HeaderText = "Customer Name";
      myColumnStyle->Width = 250;
      myTableStyle->GridColumnStyles->Add( myColumnStyle );
      myDataGrid->TableStyles->Add( myTableStyle );
   }

   void myButton1_Click( Object^ /*sender*/, EventArgs^ /*e*/
 )
   {
      // Reset the background color.
      myTableStyle->ResetBackColor();
   }
private void AddCustomColumnStyle()
{
    // Set the TableStyle Mapping name.
    myTableStyle.set_MappingName("customerTable");
    myTableStyle.set_BackColor(Color.get_Pink());

    // Set the ColumnStyle properties and add to TableStyle.
    myColumnStyle.set_MappingName("Customers");
    myColumnStyle.set_HeaderText("Customer Name");
    myColumnStyle.set_Width(250);
    myTableStyle.get_GridColumnStyles().Add(myColumnStyle);
    myDataGrid.get_TableStyles().Add(myTableStyle);
} //AddCustomColumnStyle

private void myButton1_Click(Object sender,
 EventArgs e)
{
    // Reset the background color.
    myTableStyle.ResetBackColor();
} //myButton1_Click

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



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

辞書ショートカット

すべての辞書の索引

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

   

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



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

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

©2025 GRAS Group, Inc.RSS