Biblis A
Biblis A

Reputation:

Is it possible to format Tooltip-Text (bold, underline... etc)?

I want to make some passages of a standard tooltip bold in a WinForms application. Is this possible?

If not, is there a (free) tooltip component that allows me to style them (preferably also border and background)?

Thanks!

Upvotes: 4

Views: 19535

Answers (3)

Eric
Eric

Reputation: 1

Yes! I've found a way to do this without creating a custom class. It's a bit of a pain though.

You can actually paste formatted text into the Windows Forms Designer, and it will keep the text formatting in the tool tip. You can use this to create bold or underlined text, or even change the font. It seems that copying text with a set font size freaks it out though

The dialog for you to paste shows up when you click the dropdown arrow on the "ToolTip on [ToolTip Name]" property that shows up in your controls under the "Misc" section.

So, if you wanted to add the tool tip to a specific label, you would open the properties for that label, and then paste your text into the property that's generated for the tool tip inside of there. It's a pretty strange system, but hopefully that made enough sense.

Upvotes: -1

user3141530
user3141530

Reputation: 1

If you know a little about html, you can just write the tooltip like this:

_toolTip.SetToolTip(button, String.Format("<font face=\"Microsoft Yahei\" color=\"blue\">{0}</font>", Tooltip Text));

Upvotes: -2

Patrick Desjardins
Patrick Desjardins

Reputation: 140793

You can use this type : Balloon tool tip. This let you have some bold title and some color option. You might be able to modify the source to get underline, italic and bold inside the message.

alt text

Update:

You can modify the drawing of the ToolTip (and the FONT object of the text). This is how to do it. The code in this link is for the normal ToolTip, not the Balloon I posted above.

Upvotes: 3

Related Questions