开发者

Winform AutoEllipsis Width

I have a Winform label control with AutoEllipsis set to True. The label itself has a max size set and AutoSize set to false.

When text extends the width of the label an ellipsis is displayed (...) and a too开发者_运维技巧l tip appears on hover. This is great but the resulting toolip is too long. Is there anyway to control how the tooltip appears? Ideally I'd like to set a max width on the actual tooltip and have the text wrap within it.

Any ideas?


You can start a new line:

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

I don't see any way to control the size. You could probably do it with an Owner draw version, there are some examples of Owner Drawn tooltip controls available on the web...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜