ToolTipsFactory

Object Model - Additional Properties - BackgroundHatchStyle

Gets or sets a value that specifies the hatch-pattern used to fill the tooltip border.

[Visual Basic]
Public Property BackgroundHatchStyle As HatchStyle
[C#]
public HatchStyle BackgroundHatchStyle {get; set;}

Property Value

Any value provided by the System.Drawing.Drawing2D.HatchStyle class.

Overridable

Layout-file

Property of
AnimationTT ImageTT SingleLineTT MultiLineTT

Description

This value defines the hatch-pattern 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, while the foreground color is specified by the BackgroundHatchColor-property. The following table shows a list of all available hatch-styles:

 

 

 

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

'Assign a new background hatch pattern

'to the tooltip component

Me.MultiLine.GetMultiLineToolTip(Panel1) _

.BackgroundHatchStyle = HatchStyle.Wave

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

'Assign a new background hatch pattern

'to the override-object for Panel1

Me.MultiLine.GetMultiLineToolTip(Panel1).Override _

.BackgroundOverride.BackgroundHatchStyle = HatchStyle.Percent25

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