Home > Net >  How to make a C# Form ToolTip say "ToolTip" in bold above the setToolTip message
How to make a C# Form ToolTip say "ToolTip" in bold above the setToolTip message

Time:10-09

I am working on a project that requires setting toolTips at runtime and this is hard for me to explain so I will let the pictures do most the talking.

This screenshot is my ToolTip so far and notice the blank space above the text 'Enter Numbers Only'. I want it to say ToolTip in bold to fill that space.

This is my ToolTip so far and notice the blank space above the text . I want it to say ToolTip in bold to fill that space.

Here is an example of the finished product that I want to achieve. Notice to the right of Blue information Icon it says ToolTip in bold. How can I add this to my code?

enter image description here

public Calculator()
{
    InitializeComponent();
    toolTip1.SetToolTip(firstTextBox, "Enter Numbers Only");
    toolTip1.ToolTipIcon = ToolTipIcon.Info;
    toolTip1.IsBalloon = true;
}

CodePudding user response:

you can use ToolTipTitle try this:

  toolTip1.SetToolTip(textBox1, "...");
  toolTip1.ToolTipTitle = "Enter Numbers Only";
  toolTip1.ToolTipIcon = ToolTipIcon.Info;
  toolTip1.IsBalloon = true;

and result:

enter image description here

  • Related