Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » FontDialog widget problem on windows 7, 8, 10
FontDialog widget problem on windows 7, 8, 10 [message #1765588] Mon, 12 June 2017 15:12
ayman salah is currently offline ayman salahFriend
Messages: 131
Registered: June 2015
Senior Member
I am using Eclipse 3.7.0 for plugin development and I am using Xtext 2.9.2. My editor preferences isn't working correctly.

On windows 7, 8, 10 this happens:
- On 64 bit builds, I am not able to change editor font. Hitting the change button does nothing but change the mouse to the busy/sandclock for a second and then back again to normal.
*** The same 64 bit builds were tested on windows XP and everything works as it should. ***
- On 32 bit builds, everything works as expected and the windows font picker dialog appears.
enter image description here

This is how I create the preference page:

protected void createFieldEditors() {
  // Add show font preference
  fontField = new FontFieldEditor(JFaceResources.TEXT_FONT, EDIT_EDITOR_FONT_LABEL, getFieldEditorParent());


  // initialize the font preference with the default resources font if not initialized
  String defaultFont = getPreferenceStore().getDefaultString(JFaceResources.TEXT_FONT);
  if(defaultFont.isEmpty()) {
     font= JFaceResources.getTextFont();
     if (font != null) {
        FontData[] data= font.getFontData();
        if (data != null && data.length > 0) {
           PreferenceConverter.setDefault(getPreferenceStore(), JFaceResources.TEXT_FONT, data[0]);


The .log file is empty and has nothing that is beneficial.


While debugging, I went to and found that this line always returns false without the dialog appearing:

/* Open the dialog */
boolean success = OS.ChooseFont (lpcf)

From what I understand this call should be blocking and will only return when the dialog is closed either by X, OK or Cancel buttons but it returns immediately with false.


I also tried something as minimal as this example and same thing happens.
Previous Topic:Neon - FromEditor pages are disposed 2x
Next Topic:internal API use vs. code clone
Goto Forum:

Current Time: Wed Apr 14 06:03:58 GMT 2021

Powered by FUDForum. Page generated in 0.01848 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top