Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / January 2005

Tip: Looking for answers? Try searching our database.

swt modal dialog

Thread view: 
voidx999 - 18 Jan 2005 10:27 GMT
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...


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.