Autoform Ellipse Width Winform

I have a Winform label control with an AutoEllipsis parameter set to True. The shortcut itself has a maximum size, and AutoSize is false.

When the text expands the width of the label, an ellipsis (...) is displayed, and a tooltip appears when you hover over it. This is great, but the resulting tool is too long. Is there a way to control how a tooltip appears? Ideally, I would like to set the maximum width in the actual tooltip and have text in it.

Any ideas?

+4
source share
1 answer

You can run a new line:

this.toolTip1.SetToolTip(this.button1, "Test 1" + System.Environment.NewLine + "Test 2"); 

I see no way to control the size. Perhaps you can do this with the ownerโ€™s Drawer version, there are some examples of Owner Drawn tooltips available on the Internet ...

+1
source

Source: https://habr.com/ru/post/1305568/


All Articles