Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Controling the CLOSE decoration on a Shell
Controling the CLOSE decoration on a Shell [message #445354] Wed, 03 November 2004 20:44 Go to next message
Richard Maxwell is currently offline Richard MaxwellFriend
Messages: 6
Registered: July 2009
Junior Member
There is a problem with SWT model dialogs not closing (see buzilla 70729
"Plugin: Modal dialog blocks other dialogs closing")
which I am trying to work around in eclipse v301

I want to control the CLOSE decoration of a shell created as follows so the
dialog cannot be closed too early.
Shell shell = new Shell(parent, SWT.TITLE | SWT.BORDER | SWT.CLOSE);

How can I either make CLOSE invisible ... or ... disable the CLOSE button
.... till I am ready.
Re: Controling the CLOSE decoration on a Shell [message #445361 is a reply to message #445354] Thu, 04 November 2004 10:35 Go to previous messageGo to next message
Richard Moore is currently offline Richard MooreFriend
Messages: 71
Registered: July 2009
Member
Hi,

Try subclassing the dailog class and overriding the getStyle method......

Regards
Richard



"Richard Maxwell" <richard_maxwell@uk.ibm.com> wrote in message
news:cmbfv9$q46$1@eclipse.org...
> There is a problem with SWT model dialogs not closing (see buzilla 70729
> "Plugin: Modal dialog blocks other dialogs closing")
> which I am trying to work around in eclipse v301
>
> I want to control the CLOSE decoration of a shell created as follows so
> the
> dialog cannot be closed too early.
> Shell shell = new Shell(parent, SWT.TITLE | SWT.BORDER | SWT.CLOSE);
>
> How can I either make CLOSE invisible ... or ... disable the CLOSE button
> ... till I am ready.
>
>
Re: Controling the CLOSE decoration on a Shell [message #445369 is a reply to message #445354] Thu, 04 November 2004 14:12 Go to previous messageGo to next message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
For an example of overriding the Close button to not close its shell see
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.sni ppets/src/org/eclipse/swt/snippets/Snippet99.java?rev=HEAD&a mp;content-type=text/vnd.viewcvs-markup .

"Richard Maxwell" <richard_maxwell@uk.ibm.com> wrote in message
news:cmbfv9$q46$1@eclipse.org...
> There is a problem with SWT model dialogs not closing (see buzilla 70729
> "Plugin: Modal dialog blocks other dialogs closing")
> which I am trying to work around in eclipse v301
>
> I want to control the CLOSE decoration of a shell created as follows so
the
> dialog cannot be closed too early.
> Shell shell = new Shell(parent, SWT.TITLE | SWT.BORDER | SWT.CLOSE);
>
> How can I either make CLOSE invisible ... or ... disable the CLOSE button
> ... till I am ready.
>
>
Re: Controling the CLOSE decoration on a Shell [message #445392 is a reply to message #445369] Thu, 04 November 2004 19:47 Go to previous message
Richard Maxwell is currently offline Richard MaxwellFriend
Messages: 6
Registered: July 2009
Junior Member
Thanks. This suggestion was just what I wanted.
Cheers

"Grant Gayed" <grant_gayed@ca.ibm.com> wrote in message
news:cmddbo$jj$1@eclipse.org...
> For an example of overriding the Close button to not close its shell see
>
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.sni ppets/src/org/eclipse/swt/snippets/Snippet99.java?rev=HEAD&a mp;content-type=text/vnd.viewcvs-markup .
>
> "Richard Maxwell" <richard_maxwell@uk.ibm.com> wrote in message
> news:cmbfv9$q46$1@eclipse.org...
> > There is a problem with SWT model dialogs not closing (see buzilla 70729
> > "Plugin: Modal dialog blocks other dialogs closing")
> > which I am trying to work around in eclipse v301
> >
> > I want to control the CLOSE decoration of a shell created as follows so
> the
> > dialog cannot be closed too early.
> > Shell shell = new Shell(parent, SWT.TITLE | SWT.BORDER | SWT.CLOSE);
> >
> > How can I either make CLOSE invisible ... or ... disable the CLOSE
button
> > ... till I am ready.
> >
> >
>
>
Previous Topic:SWT_AWT Bridge for Applet?
Next Topic:Screen capture and Menus
Goto Forum:
  


Current Time: Tue Apr 16 14:10:48 GMT 2024

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

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

Back to the top