Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » Resizable non modal dialog
Resizable non modal dialog [message #1269905] Wed, 12 March 2014 09:56 Go to next message
Cedric Moonen is currently offline Cedric MoonenFriend
Messages: 274
Registered: August 2009
Senior Member
Hello,

I'm trying to create a resizable non-modal dialog but strangely enough this doesn't seem to work.
I created my own dialog class extending "org.eclipse.jface.dialogs.Dialog". In my constructor, I specify:

setShellStyle(SWT.CLOSE | SWT.MODELESS | SWT.BORDER | SWT.TITLE);
setBlockOnOpen(false);


And I also override isResizable:
@Override
protected boolean isResizable() {
	return true;
}


My dialog is non-modal but I cannot resize it. What is the problem ? The find dialog in Eclipse (CTRL+F) displays the behavior I want to achieve (it is non-modal AND resizable).

Thank you,
Cédric
Re: Resizable non modal dialog [message #1270683 is a reply to message #1269905] Thu, 13 March 2014 10:22 Go to previous message
Cedric Moonen is currently offline Cedric MoonenFriend
Messages: 274
Registered: August 2009
Senior Member
Ok, I found the solution:

The isResizable method is called when the super constructor is called, and is used to set the shell style (setShellStyle). This will be overwritten by my call to setShellStyle (so the method is useless here). I have to pass the SWT.RESIZE style as well in my call to setShellStyle.

The strange thing is that the documentation mentions that SWT.RESIZE is used by Decorations and subclasses and by tracker. It doesn't mention that it is used by dialogs as well...
Previous Topic:TreeViewer vs TableViewer
Next Topic:How to display the percentage text in ProgressMonitorDialog
Goto Forum:
  


Current Time: Thu Apr 25 23:28:45 GMT 2024

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

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

Back to the top