简体   繁体   English

多行SWT文字提示

[英]Hint on multiline SWT Text

I am experiencing what might be a potential bug in SWT. 我正在体验SWT中潜在的错误。

The hint of a Text widget seems to become invisible for multiline texts ( SWT.MULTI option). 对于多行文本( SWT.MULTI选项),“ Text小部件的提示似乎变得不可见。

 Text multilineText = new Text(parent, SWT.MULTI);
 multilineText.setMessage("[undisplayed hint <:( ]");

Is there something that I am missing? 有什么我想念的吗?

NOTE: I am applying a GridDataFactory.fillDefaults() layout to the widget. 注意:我正在将GridDataFactory.fillDefaults()布局应用于小部件。

Text with SWT.MULTI does not support setMessage . 具有SWT.MULTI Text不支持setMessage

There is an open bug report 328832 for this, but it has been open since 2011. 有一个针对此的打开错误报告328832 ,但自2011年以来一直处于打开状态。

Looking at the macOS version of the setMessage code it explicitly checks for SWT.SINGLE . 查看setMessage代码的macOS版本,它显式检查SWT.SINGLE

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM