问题
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