SWT: FontDialog without color selector

北城余情 提交于 2019-12-11 01:37:19

问题


How to show the SWT FontDialog without the color option (in our application colors are configured independent of the font)?


回答1:


Eclipse bug 35890 discusses this option, and it is labelled as fixed.

There is a new method :

 fontDialog.setEffectsVisible(false);

but when I try to use it on a Mac this is reporting

 cannot find symbol method setEffectsVisible(boolean)

and will not compile. Windows only? Maybe?




回答2:


It looks like that dialog depends on system, on my win7 is default dialog FontDialog dlg = new FontDialog(shell, SWT.NONE); dlg.open(); do contains color selection, but on Linux (Mint 1) does not..

So that's not best way, but you can just ignore the color selection you get from user in this dialog..



来源:https://stackoverflow.com/questions/6493689/swt-fontdialog-without-color-selector

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!