Object Model - Common Properties - BorderHatchColor

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

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

Property Value

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




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

The background color for the hatch pattern is defined by the BorderColor-property. The following table shows some examples of different BorderColor- and BorderHatchColor-combinations. As you see from the samples, also Color.Transparent is supported to create hatched tooltip borders.


Border settings Result


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

'Assign a new foreground color for the border hatch pattern

'to the tooltip component

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

This default BorderHatchColor 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 BorderHatchColor 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 border hatch pattern

'to the override-object for Panel1

Me.MultiLine.GetMultiLineToolTip(Panel1).Override _

.BorderOverride.BorderHatchColor = Color.Transparent

Example 1

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

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

Me.MultiLine.Border = BorderStyle.Hatch

Me.MultiLine.BorderWidth = 15  'make the border 15 pixel wide

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

Me.MultiLine.BorderColor = Color.Transparent 

'...and it's foreground color.

Me.MultiLine.BorderHatchColor = Color.Blue

'select the hatch-pattern

Me.MultiLine.BorderHatchStyle = Drawing2D.HatchStyle.Percent50