AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

swt modal dialog

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java GUI Toolkits
View previous topic :: View next topic  
Author Message
voidx999
Guest





PostPosted: Tue Jan 18, 2005 10:27 am    Post subject: swt modal dialog Reply with quote



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 Smile 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





PostPosted: Tue Jan 18, 2005 10:54 am    Post subject: Re: swt modal dialog Reply with quote



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





PostPosted: Tue Jan 18, 2005 11:40 am    Post subject: Re: swt modal dialog Reply with quote



i forgot to remove line with shell.dispose(); of course...


Back to top
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java GUI Toolkits All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.