Disable Close Button

SWT Designer allows you to create the views, editors, perspectives, pref pages, composites, etc. that comprise Eclipse SWT & RCP applications and plug-ins.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

Disable Close Button

Postby Alucard_cr » Wed Feb 11, 2004 10:13 am

How can I disable de close buton in a Jface ApplicationWindow?? or any swt window????
Posts: 4
Joined: Mon Feb 09, 2004 2:32 pm

Postby raphael » Wed Feb 11, 2004 11:58 am

For an SWT Application window you can set the style you want when you create a shell. Create a shell like the following:
Shell shell = new Shell(SWT.TITLE | SWT.RESIZE);
This creates a title bar and allows the shell to be resized. It has no min, max or close buttons.

check out http://www.eclipse.org/documentation/ht ... Shell.html
for other stuff on Shell.

If you use SWT.MIN, SWT.MAX, or SWT.CLOSE, the close button will appear.
I don't know how to disable it for JFace.

Go to
http://www.eclipse.org/documentation/ht ... index.html
For all of Eclipse's API docs
Posts: 22
Joined: Thu Jan 29, 2004 3:41 pm

Postby Alucard_cr » Thu Feb 12, 2004 1:28 pm

Posts: 4
Joined: Mon Feb 09, 2004 2:32 pm

Return to SWT Designer

Who is online

Users browsing this forum: No registered users and 1 guest