ToolTipsFactory

Object Model - Additional Properties - Symbol

Gets or sets a value which holds the symbol to be placed next to text displayed in a SingleLineToolTip.

[Visual Basic]
Public Property Symbol As Image
[C#]
public Image Symbol {get; set;}

Property Value

Any bitmap image in a format supported by the .NET framework or Nothing.

Overridable

Layout-file

Property of
AnimationTT ImageTT SingleLineTT MultiLineTT

Description

This property holds a reference to an Image-object (any kind of bitmap-image supported by the .NET-framework) to be displayed in a SingleLineToolTip as a decorating symbol next to the main tooltip-text.

If a bitmap-image is assigned to the Symbol-property, it will be drawn on either the right or the left side of the tooltip-text (this is defined by the SymbolAlignment-property).

Because the height of the tooltip-content is defined by the selected Font, the given symbol-image will be scaled down isotropically (proportionally) to fit into the available vertical space. Therefore the images are always rendered with a height slightly larger then the tallest character displayed by the tooltip.

Here are some samples:

 

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

'Define a new symbol to be placed next to the text of all tooltips

'shown by this component

Me.SingleLineTT.Symbol = Image.FromFile("C:\Temp\MyLogo.png")

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

'Override the default symbol for the tooltip

'of Panel1...

Me.SingleLineTT.GetSingleLineToolTip(Panel1) _

.Override.Symbol = Image.FromFile("C:\Temp\FloppyDisk.png")

'...and place it on the right side of the tooltip text.

Me.SingleLineTT.GetSingleLineToolTip(Panel1) _

.Override.SymbolAlignment = SymbolLocation.Right