Category / Section
How to set Padding to the SuperToolTip?
You can set the Padding to the ToolTip text by using the TextMargin property in the SuperToolTip.
The following code example demonstrates the same.
C#
//Initializes the ToolTipInfo. Syncfusion.Windows.Forms.Tools.ToolTipInfo toolTipInfo1 = new Syncfusion.Windows.Forms.Tools.ToolTipInfo(); //Specifies the ToolTip text. toolTipInfo1.Body.Text = "SuperToolTip for ButtonAdv"; //Sets the TextMargin. toolTipInfo1.Body.TextMargin = new Padding(20, 20, 20, 20); //Assigns the SuperToolTip to ButtonAdv. this.superToolTip1.SetToolTip(this.buttonAdv1, toolTipInfo1);
VB
'Initializes the ToolTipInfo Dim toolTipInfo1 As New Syncfusion.Windows.Forms.Tools.ToolTipInfo() 'Specifies the ToolTip text. toolTipInfo1.Body.Text = "SuperToolTip for ButtonAdv" 'Sets the TextMargin. toolTipInfo1.Body.TextMargin = New Padding(20, 20, 20, 20) 'Assigns the SuperToolTip to ButtonAdv. Me.superToolTip1.SetToolTip(Me.buttonAdv1, toolTipInfo1)
Note:
- The property “TextMargin” aligns the text to the defined location within the SuperToolTip.
- The “TextMargin” can be applied to the text shown in the Body, Header, and Footer of the SuperToolTip.

Figure 1: Before specifying the TextMargin to SuperToolTip

Figure 2: After specifying the TextMargin to SuperToolTip
Sample Links: