Eclipse RCP Main Window Does Not Resize

Does anyone know how to disable the ability to resize the main window of my Eclipse application.

thanks a lot

+4
source share
1 answer

You can try the restrictive ShellStyle as suggested in this thread and detailed in this ( 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 Javadoc Constructor for a Shell (int) for an explanation of how to form an argument.
According to WorkbenchWindowConfigurer , the default value is SWT.SHELL_TRIM , which includes the SWT.RESIZE option.
You will need to formulate a value that does not include SWT.RESIZE .

This is exactly what I was looking for

 configurer.setShellStyle(SWT.DIALOG_TRIM); 
+3
source

Source: https://habr.com/ru/post/1334312/


All Articles