Object Model - Common Properties - BorderHatchStyle

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

[Visual Basic]
Public Property BorderHatchStyle As HatchStyle
public HatchStyle BorderHatchStyle {get; set;}

Property Value

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




This value defines the hatch-pattern 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, while the foreground color is specified by the BorderHatchColor-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 BorderHatchStyle directly for the component), the assigned hatch-style will become the default BorderHatchStyle for the tooltips of all controls on the same form:

'Assign a new border hatch pattern

'to the tooltip component

Me.MultiLine.GetMultiLineToolTip(Panel1).BorderHatchStyle = HatchStyle.Wave

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

'Assign a new border hatch pattern

'to the override-object for Panel1

Me.MultiLine.GetMultiLineToolTip(Panel1).Override _

.BorderOverride.BorderHatchStyle = HatchStyle.Percent25

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