开发者

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

开发者 https://www.devze.com 2022-12-26 20:29 出处:网络
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.

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

精彩评论

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