SWT: FontDialog without color selector
How to show the SWT FontDialog
without the color option (in our application colors are configured independen开发者_JAVA百科t of the font)?
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..
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?
精彩评论