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 05:56 Go to next message
Cedric Moonen is currently offline Cedric Moonen
Messages: 269
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 06:22 Go to previous message
Cedric Moonen is currently offline Cedric Moonen
Messages: 269
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:Why one additional column / row in TableViewer?
Next Topic:TreeViewer refresh/update specific TreeColumn
Goto Forum:
  


Current Time: Thu Jul 31 09:45:00 EDT 2014

Powered by FUDForum. Page generated in 0.01620 seconds