Hi !
Im trying to do simple thing - create modal swt FontDialog. It works not
very well, dialog is modal but it can loose focus when user clicks outside
it's rectangle...
What I simply want is that "modality" that for example standart eclipse
window/preferences has - it is modal and when you click outside it's area,
it'll blick and it will hold focus...
Here is my dialog creating code, I dont know if Im doing it right, I have
one suspect - Im not sure if Im handling work with Shell properly, I didnt
have time to deeply study it :) This code is in class that extends
PreferencePage and implements IWorkbenchPreferencePage...
..
Shell shell = new Shell(getShell());
FontDialog fontDialog = new FontDialog(shell, SWT.APPLICATION_MODAL);
bqoEditorFont = fontDialog.open();
shell.dispose();
..
voidx999 - 18 Jan 2005 10:54 GMT
Oh, I found the resolution, really simple... I was right when I said that
probably Im handling shells not properly...
It's not necessary to create new shell, here is modified code...
..
FontDialog fontDialog = new FontDialog(getShell(),
SWT.APPLICATION_MODAL);
bqoEditorFont = fontDialog.open();
shell.dispose();
..
voidx999 - 18 Jan 2005 11:40 GMT
i forgot to remove line with shell.dispose(); of course...