Articles in this section
Category / Section

How to set Padding to the SuperToolTip?

4 mins read

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:

  1. The property “TextMarginaligns the text to the defined location within the SuperToolTip.
  2. 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:

C#: SuperToolTip_TextMargin_C#

VB: SuperToolTip_TextMargin_VB

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied