英文:
label.setToolTipText("<html><p width=\"350\">" + text.toUpperCase() + "</p></html>") in java SWT not working
问题
我希望当提示信息的宽度超过最大宽度,例如350个字符时,能够显示多行提示信息。
Label label = new Label(this.wfSummaryComposite, SWT.NONE);
String text = "文本内容超过350个字符";
label.setToolTipText("<html><p width=\"350\">" + text.toUpperCase() + "</p></html>");
我添加了这段代码,但它没有生效。
英文:
I want to display my tooltip in multiple lines when it crosse max width for ex: 350 characters.
Label label = new Label(this.wfSummaryComposite, SWT.NONE);
String text = "Text which has more than 350 characters"
label.setToolTipText("<html><p width=\"350\">" + text.toUpperCase() + "</p></html>")
I added this code but it not working.
专注分享java语言的经验与见解,让所有开发者获益!
评论