Category / Section
How to give multiple lines to SuperToolTip for a control?
1 min read
In order to give multiple lines to SuperToolTip, click on the Text property of the ComboBox from Body, Header and Footer in the property grid.
Figure 1: Property Grid
A listbox appears where you can type the text and press the enter key in order to move to the next line as shown in the following image.
Figure 2: ToolTip Editor (Text specified with multiple line)
The following code example demonstrates the same.
C#
//Initialize the ToolTipInfo Syncfusion.Windows.Forms.Tools.ToolTipInfo toolTipInfo = new Syncfusion.Windows.Forms.Tools.ToolTipInfo(); //To specify the ToolTip Text with multiple lines toolTipInfo.Body.Text = "SuperToolTip can have mulitple\r\nlines of text\r\n\r\nUser can choose any color from \r" + "\nthe Color Dialog"; toolTipInfo.Footer.Text = "Footer (Can be hidden using\r\n Hidden property)"; toolTipInfo.Header.Text = "ToolTip Header"; //To assign the SuperToolTip this.superToolTip1.SetToolTip(this.textBox1, toolTipInfo);
VB
'Initialize the ToolTipInfo Dim toolTipInfo As New Syncfusion.Windows.Forms.Tools.ToolTipInfo() 'To specify the ToolTip Text with multiple lines toolTipInfo.Body.Text = "SuperToolTip can have mulitple" & Constants.vbCrLf & "lines of text" & Constants.vbCrLf & Constants.vbCrLf & "User can choose any color from " & Constants.vbCr + Constants.vbLf & "the Color Dialog" toolTipInfo.Footer.Text = "Footer (Can be hidden using" & Constants.vbCrLf & " Hidden property)" toolTipInfo.Header.Text = "ToolTip Header" 'To assign the SuperToolTip Me.superToolTip1.SetToolTip(Me.textBox1, toolTipInfo)
Note: The ToolTip Editor window appears when you click on the ToolTip on SuperToolTip1 property.
Figure 3: ToolTip Text specified with multiple line
Sample Links: