 |
AppletTalk.com Java discussions newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
voidx999 Guest
|
Posted: Tue Jan 18, 2005 10:27 am Post subject: swt modal dialog |
|
|
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();
...
|
|
| Back to top |
|
 |
voidx999 Guest
|
Posted: Tue Jan 18, 2005 10:54 am Post subject: Re: swt modal dialog |
|
|
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();
...
|
|
| Back to top |
|
 |
voidx999 Guest
|
Posted: Tue Jan 18, 2005 11:40 am Post subject: Re: swt modal dialog |
|
|
i forgot to remove line with shell.dispose(); of course...
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|