I have a winforms application which is having Black-White theme. I have a treeview, whose background color is set to black and text appears white. I have set hotTracking to true. Now as per the following MSDN link: https://msdn.microsoft.com/en-us/library/system.windows.forms.treeview.hottracking.aspx
When the
HotTracking
property is set to true, each tree node label takes on the appearance of a hyperlink as the mouse pointer passes over it. The Underline font style is applied to the Font and the ForeColor is set to blue to make the label appear as a link. The appearance is not controlled by the Internet settings of the user's operating system.
It seems that the fore-color is hard-coded to Blue. But this creates issue in my application, as shown in the attached sample image. Due to this blue color, the text becomes un-readable on a black background. Although I can disable hot-tracking, but client needs it. Is there a way to over-ride the fore-color of hot tracking.
Here is my sample code that I use to apply theme to tree view:
this.trvUsers.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.trvUsers.FullRowSelect = true;
this.trvUsers.HideSelection = false;
this.trvUsers.HotTracking = true;
this.trvUsers.ShowLines = false;
this.treeView1.BackColor = System.Drawing.Color.Black;
this.treeView1.ForeColor = System.Drawing.Color.White;