Object Model - Additional Properties - FontColor

Gets or sets a value which defines the solid color to be used for the rendering of textual tooltip content.

[Visual Basic]
Public Property FontColor As Color
public Color FontColor {get; set;}

Property Value

Any color provided by the System.Drawing.Color class.



Property of
AnimationTT ImageTT SingleLineTT MultiLineTT


This property defines the color to be used to render the tooltip text either solid (TextStyle=Solid) or as background-color for the hatch pattern used to render hatched text (TextStyle=Hatch).

This property is only significant for tooltip-layouts where the selected TextStyle is either Solid or Hatch.  

If FontColor is set to Color.Transparent and Background=Normal, the tooltip text will be rendered transparent as long as BackColor <> Color.Transparent. With this configuration the rendered text gets completely transparent and makes the objects (windows) behind the tooltip visible, as shown below:


Transparent fonts are also supported by the Hatch-TextStyle. In contrast to the scenario described above, in this case the transparency is limited to the tooltip itself. This means, if either FontColor or FontHatchColor is set to Color.Transparent, the corresponding part of the rendered font is made transparent in order to let the tooltip background shine through - not what lays behind the tooltip.

With FontColor=Color.Transparent and FontHatchColor set to some color <> Color.Transparent, effects like the following can be created:

The contrary - FontColor<>Color.Transparent and FontHatchColor=Color.Transparent - can also be applied:


If specified at the component-level for a tooltip component (i.e. by assigning the color directly to the component), the assigned value will become the default FontColor for the tooltips of all controls on the same form:

'Assign a new color for the tooltip component font

Me.MultiLine.GetMultiLineToolTip(Panel1).FontColor = Color.Crimson

This default FontColor can be overridden for each control through the Override-property provided to all controls on the same form by the tooltip component (see "The Override-Property").

If the override-value for the FontColor has to be set or changed at runtime for the tooltip of a specific control, code like the following is needed:

Me.MultiLine.GetMultiLineToolTip(Panel1).Override _

.FontLayoutOverride.FontColor = Color.Red

Example 1

This statements define a default solid green font for all controls on the same form as the tooltip component:

'define a solid green font...

Me.MultiLine.TextStyle = TextDrawingStyle.Solid

Me.MultiLine.FontColor = Color.Green 'assign the desired color

Example 2

This changes the FontColor for the tooltip of Panel1 to a random color and enforces the overridden text-layout to be painted with a solid color:

Dim R,G,B As Integer

'First, we get random values for the red, green and red

'components of the color to assign.

R = CInt(Int((256) * Rnd()))
G = CInt(Int((256) * Rnd()))
B = CInt(Int((256) * Rnd()))
'Then we create the color with the random RGB-components and assign

'the resulting color as FontLayoutOverride.FontColor.

Me.MultiLine.GetMultiLineToolTip(Panel1).Override _

.FontLayoutOverride.BorderColor = Color.FromArgb(R,G,B)

'And to make sure this color is really applied, we also set

'the other properties correctly to get solid colored text....

Me.MultiLine.GetMultiLineToolTip(Panel1).Override _

.FontLayoutOverride.TextStyle = TextDrawingStyle.Solid