Skip to main content



      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
Eclipse UserFriend
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
Eclipse UserFriend
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: Tue Jul 01 17:02:17 EDT 2025

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

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

Back to the top