开发者

How can one create a org.eclipse.jface.preference.BooleanFieldEditor with a multi-line label?

The ff. does not work. "Second line" is rendered on the same line开发者_高级运维 as "First line". What's more is that there is no space between the two.

new BooleanFieldEditor("Name", "First line\nSecond line", getFieldEditorParent());


The BooleanFieldEditor uses an SWT Label. You can't specify multiple lines for this type of widget.

I would suggest that you will need to create a custom implementation by subclassing FieldEditor.

Two things to help with this:

  • The source for the BooleanFieldEditor
  • A tutorial on creating a custom FieldEditor
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜