ToolTipsFactory

Object Model - Additional Properties - BackgroundHatchColor

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

[Visual Basic]
Public Property BackgroundHatchColor As Color
[C#]
public Color BackgroundHatchColor {get; set;}

Property Value

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

Overridable

Layout-file

Property of
AnimationTT ImageTT SingleLineTT MultiLineTT

Description

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

The background color for the hatch pattern is defined by the BackColor-property. The following table shows some examples of different BackColor- and BackgroundHatchColor-combinations. As you see from the samples, Color.Transparent is supported to create hatched tooltip backgrounds, but - in contrast to hatched borders - you get only a transparently hatched background if BackColor is set to Color.Transparent. If BackgroundHatchColor is set to Color.Transparent no hatch-pattern will be visible.

 

Background settings Result

 

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

'Assign a new foreground color for the background hatch pattern

'to the tooltip component

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

This default BackgroundHatchColor 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 BackgroundHatchColor 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 background hatch pattern

'to the override-object for Panel1

Me.MultiLine.GetMultiLineToolTip(Panel1).Override _

.BorderOverride.BackgroundHatchColor = Color.Cyan

Example 1

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

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

Me.MultiLine.Background = BackgroundStyle.Hatch

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

Me.MultiLine.BackColor = Color.Transparent 

'...and it's foreground color.

Me.MultiLine.BackgroundHatchColor = Color.Blue

'select the hatch-pattern

Me.MultiLine.BackgroundHatchStyle = Drawing2D.HatchStyle.Percent50