Category / Section
How to show the SuperToolTip at any location for a particular time interval?
1 min read
The SuperToolTip can be shown at any specified location and for a particular amount of time by using the Show() method of the SuperToolTip.
The Show() method takes 3 arguments. They are,
- ToolTipInfo object.
- Point object.
- Duration in milliseconds.
The last parameter Duration is optional.
The following code example demonstrate the same.
C#
//Initializes the ToolTipInfo. ToolTipInfo toolTipInfo = new ToolTipInfo(); //Specifies the ToolTip Text. toolTipInfo.Body.Text = "Create a ToolTipInfo.\r\n And Show it."; toolTipInfo.Header.Text = "ToolTip Header"; //Shows the SuperToolTip. this.superToolTip1.Show(toolTipInfo, new Point(420, 210));
VB
'Initializes the ToolTipInfo. Dim toolTipInfo As New ToolTipInfo() 'Specifies the ToolTip Text. toolTipInfo.Body.Text = "Create a ToolTipInfo." & Constants.vbCrLf & " And Show it." toolTipInfo.Header.Text = "ToolTip Header" 'Shows the SuperToolTip. Me.superToolTip1.Show(toolTipInfo, New Point(420, 210))
To show the SuperToolTip for an infinitive amount of time, pass -1 as the value to the last parameter.
The following code example demonstrates the same.
C#
//Shows the SuperToolTip with specified time. this.superToolTip1.Show(toolTipInfo, new Point(420, 210), -1);
VB
'Shows the SuperToolTip with specified time. Me.superToolTip1.Show(toolTipInfo, New Point(420, 210), -1)
Figure 1: ToolTip with specified location
Sample Links: