I've got a window I popup that I'd like to style the same as the default Windows tooltip.
What system colour should I be setting the BackColor
property to? There isn't a TooltipBackColor
in the system colours property tab.
Apologies to Jalal Aldeen Saa'd but I'm already using System.Drawing.SystemColors.Info
and this doesn't change from the default dull yellow colour when I change theme, but the tooltip backgrounds do, as you can see in this screen shot:
(It's actually a bug that you can get both the tooltip and the popup visible at the same time)
The windows default is called Info...
EDIT:
If you are in WPF (which supports theming) then according to http://msdn.microsoft.com/de-de/library/system.windows.systemcolors.infocolor%28v=vs.85%29.aspx it is System.Windows.SystemColors.InfoColor
this updates automatically with the chosen theme
EDIT 2- for WinForms:
it is a bit more complicated... you instanciate a System.Windows.Forms.VisualStyles.VisualStyleRenderer
with a VisualStyleElement.ToolTip.Standard.Normal
and then you can call GetColor on the renderer with System.Windows.Forms.VisualStyles.ColorProperty.FillColor
that gives you the current theme backgoundcolor of a tooltip
System.Drawing.SystemColors.Info
You can get it by new System.Windows.Forms.ToolTip().BackColor
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With