Default colors for link column cells?

  • Thread starter Thread starter Jan Aagaard
  • Start date Start date
J

Jan Aagaard

How do I get the default LinkColor and VisitedLinkColor values for a
DataGridViewLinkCell?

Right now I'm using the hard coded values Color.Blue and
Color.DarkBlue, and this works fine, but it would just seem more right
to use the system's default values in stead of hard coded ones.

With a normal cell I can use myDataGridView.DefaultCellStyle.ForeColor,
but I can't find the equivalents for link columns.
 
Hi Jan,

The default colors are taken from the Internet Explorer settings and are
stored in the registry under

HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Settings
 
Morten said:
The default colors are taken from the Internet Explorer settings and are
stored in the registry under

HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Settings

Thanks for the help. But do I really have to read the registry to
access these colors? Also: I would like to revert to the default colors
for my DataGridView and not the default colors in Windows, since I
might change the colors in my application at some point.

I know that I could define color constants in my app and use them to
have a single point in my code where they are defined. But I was mostly
wondering if it is possible to access the default colors for a link in
a link column in the same fashion as the DefaultCellStyle.ForeColor
property on normal column.
 
Back
Top