Export (0) Print
Expand All
Expand Minimize

DataGridTableStyle.ResetLinkColor Method

Resets the LinkColor property to its default value.

[Visual Basic]
Public Sub ResetLinkColor()
[C#]
public void ResetLinkColor();
[C++]
public: void ResetLinkColor();
[JScript]
public function ResetLinkColor();

Remarks

You typically use this method if you are either creating a designer for the DataGridTableStyle or creating your own control incorporating the DataGridTableStyle. You can use the ShouldSerializeLinkColor method to determine whether the property value has changed from its default.

Example

[Visual Basic] 
' String variable used to show message.   
Dim myString As String = "Link color changed from: "
' Store current foreground color of selected cells.
Dim myCurrentColor As Color = myDataGridTableStyle.LinkColor
myString += myCurrentColor.ToString()
' Reset link color to default.
myDataGridTableStyle.ResetLinkColor()
myString += "  to "
myString += myDataGridTableStyle.LinkColor.ToString()
' Show information about changes in color setting.  
MessageBox.Show(myString, "Link line color information")

[C#] 
// String variable used to show message.   
string myString = "Link color changed from: ";
// Store current foreground color of selected cells.
Color myCurrentColor = myDataGridTableStyle.LinkColor;
myString += myCurrentColor.ToString();
// Reset link color to default.
myDataGridTableStyle.ResetLinkColor();
myString += "  to ";
myString += myDataGridTableStyle.LinkColor.ToString();
// Show information about changes in color setting.  
MessageBox.Show(myString, "Link line color information");

[C++] 
// String variable used to show message.
String* myString = S"Link color changed from: ";
// Store current foreground color of selected cells.
Color myCurrentColor = myDataGridTableStyle->LinkColor;
myString = String::Concat(myString,__box( myCurrentColor));
// Reset link color to default.
myDataGridTableStyle->ResetLinkColor();
myString = String::Concat(myString, S" to ");
myString = String::Concat(myString,__box( myDataGridTableStyle->LinkColor));
// Show information about changes in color setting.
MessageBox::Show(myString, S"Link line color information");

[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button Language Filter in the upper-left corner of the page.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

DataGridTableStyle Class | DataGridTableStyle Members | System.Windows.Forms Namespace | LinkColor | LinkColorChanged | ShouldSerializeLinkColor

Show:
© 2015 Microsoft