Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
Setzt die BackColor-Eigenschaft auf ihren Standardwert zurück.
Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in system.windows.forms.dll)
Syntax
'Declaration
Public Overrides Sub ResetBackColor
'Usage
Dim instance As DataGrid
instance.ResetBackColor
public override void ResetBackColor ()
public:
virtual void ResetBackColor () override
public void ResetBackColor ()
public override function ResetBackColor ()
Hinweise
Diese Methode wird i. d. R. zum Erstellen eines Designers für das System.Windows.Forms.DataGrid oder eines eigenen Steuerelements verwendet, das das System.Windows.Forms.DataGrid aufnimmt.
Beispiel
' String variable used to show message.
Dim myString As String = "Selection backgound color changed from: "
' Store current foreground color of selected cells.
Dim myCurrentColor As Color = myDataGrid.SelectionBackColor
myString += myCurrentColor.ToString()
' Reset selection background color to default.
myDataGrid.ResetSelectionBackColor()
myString += " to "
myString += myDataGrid.SelectionBackColor.ToString()
' Show information about changes in color setting.
MessageBox.Show(myString, "Selection background color information")
// String variable used to show message.
string myString = "Selection backgound color changed from: ";
// Store current foreground color of selected cells.
Color myCurrentColor = myDataGrid.SelectionBackColor;
myString += myCurrentColor.ToString();
// Reset selection background color to default.
myDataGrid.ResetSelectionBackColor();
myString += " to ";
myString += myDataGrid.SelectionBackColor.ToString();
// Show information about changes in color setting.
MessageBox.Show(myString, "Selection background color information");
// String variable used to show message.
String^ myString = "Selection backgound color changed from: ";
// Store current foreground color of selected cells.
Color myCurrentColor = myDataGrid->SelectionBackColor;
myString = String::Concat( myString, myCurrentColor.ToString() );
// Reset selection background color to default.
myDataGrid->ResetSelectionBackColor();
myString = String::Concat( myString, " to " );
myString = String::Concat( myString, myDataGrid->SelectionBackColor.ToString() );
// Show information about changes in color setting.
MessageBox::Show( myString, "Selection background color information" );
// String variable used to show message.
String myString = "Selection backgound color changed from: ";
// Store current foreground color of selected cells.
Color myCurrentColor = myDataGrid.get_SelectionBackColor();
myString += myCurrentColor.ToString();
// Reset selection background color to default.
myDataGrid.ResetSelectionBackColor();
myString += " to ";
myString += myDataGrid.get_SelectionBackColor().ToString();
// Show information about changes in color setting.
MessageBox.Show(myString, "Selection background color information");
Plattformen
Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile für Pocket PC, Windows Mobile für Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen.
Versionsinformationen
.NET Framework
Unterstützt in: 2.0, 1.1, 1.0
Siehe auch
Referenz
DataGrid-Klasse
DataGrid-Member
System.Windows.Forms-Namespace