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...
精彩评论