Eclipse RCP Main window not resizable
-
25-09-2019 - |
문제
does anyone know how to disable the possibility of resizing the main window of my Eclipse application
Thanks a lot
해결책
You can try a restrictive ShellStyle, as suggested in this thread and detailed in this one (SWT.DIALOG_TRIM
):
public void preWindowOpen() {
IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
configurer.setInitialSize(new Point(800, 600));
configurer.setShowCoolBar(false);
configurer.setShowStatusLine(false);
configurer.setTitle("RFID demo");
}
You need to call
setShellStyle()
. See the Javadoc for the Shell(int) constructor for an explanation of how to form the argument.
According toWorkbenchWindowConfigurer
the default value isSWT.SHELL_TRIM
, which includes theSWT.RESIZE
option.
You'll have to formulate a value that does not includeSWT.RESIZE
.It was exactly what I was searching for,
configurer.setShellStyle(SWT.DIALOG_TRIM);
제휴하지 않습니다 StackOverflow