Object Model - Additional Properties - FontHatchColor

Gets or sets a value that specifies the foreground color for the hatch-pattern used to fill the tooltip text.

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

Property Value

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



Property of
AnimationTT ImageTT SingleLineTT MultiLineTT


This value defines the foreground color for the hatch-pattern (defined by FontHatchStyle) used to fill the tooltip text. It is only significant for layouts where TextStyle=Hatch.

The background color for the hatch pattern is defined by the FontColor-property. The following table shows some examples of different FontColor- and FontHatchColor-combinations (more samples can be found in the section about the FontColor-property) . As you see from the samples, Color.Transparent is supported to create hatched tooltip text, but 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.


Font settings Result


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

'Assign a new foreground color for the font hatch pattern

'to the tooltip component

Me.MultiLine.GetMultiLineToolTip(Panel1).FontHatchColor = Color.Red

This default FontHatchColor 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 FontHatchColor has to be set or changed at runtime for the tooltip of a specific control, code like the following is needed:

'Assign a new foreground color for the font hatch pattern

'to the override-object for Panel1

Me.MultiLine.GetMultiLineToolTip(Panel1).Override _

.FontLayoutOverride.FontHatchColor = Color.Cyan

Example 1

This statements define a hatched font at the component level. A hatch pattern is selected and the background and foreground colors for the hatch pattern are defined:

'define a hatched font for the tooltips provided by the component (MultiLine).

Me.MultiLine.TextStyle = TextDrawingStyle.Hatch

'define the background color for the hatch-pattern...

Me.MultiLine.FontColor = Color.Transparent 

'...and it's foreground color.

Me.MultiLine.FontHatchColor = Color.Blue

'select the hatch-pattern

Me.MultiLine.FontHatchStyle = Drawing2D.HatchStyle.Percent50