ToolTipsFactory

Object Model - Additional Properties - Text

Gets or sets a value which holds the text to be displayed by the tooltip.

[Visual Basic]
Public Property Text As String
[C#]
public string Text {get; set;}

Property Value

Any valid System.String-object or Nothing.

Overridable

Layout-file

Property of
AnimationTT ImageTT SingleLineTT MultiLineTT

Description

This property holds the string to be displayed by the tooltip-component as main tooltip-content.

The MultiLineToolTip- and the SingleLineToolTip-component expose this property in their interfaces and it is fully accessible in the code-editor, but it is not shown in the property-grid of the components or the "Tooltip Layout-designer". Usually the content for a tooltip is not assigned directly to the corresponding content-property (Text, Image or AnimatedSymbol) of the component, because the tooltip-content should be provided by the individual controls of the form. This is done by means of the properties provided to the controls by the tooltip-components. Under normal circumstances it is not necessary nor useful to assign the text (the content) directly to the  Text-property of the components, because it would anyway be overridden by the property provided to the controls. Thus, code like the following should be avoided unless you know exactly what and what for you are doing it:

'Create a new string

Dim whatIsThis As String = "Who knows..?"

'To assign a string to the tooltip component

'this way, should be avoided....

Me.MySingleLineTT.Text = whatIsThis 

Instead, the created string should be assigned as specific tooltip-content for a control with the following statement:

'This is the correct way to assign a string as

'tooltip content for a specific control...

Me.MyMultiLineTT.GetMultiLineToolTip(Panel1) _

.Text = whatIsThis