문제

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 to WorkbenchWindowConfigurer the default value is SWT.SHELL_TRIM, which includes the SWT.RESIZE option.
You'll have to formulate a value that does not include SWT.RESIZE.

It was exactly what I was searching for,

configurer.setShellStyle(SWT.DIALOG_TRIM);
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top