Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Shell context menu problem
Shell context menu problem [message #439240] Thu, 08 July 2004 07:29 Go to next message
Mike Hoeffner is currently offline Mike HoeffnerFriend
Messages: 3
Registered: July 2009
Junior Member
I am creating a nonresizable tool shell with a title bar and close button
using:

// SWT.TITLE is unnecessary
m_shell = new Shell(m_display, SWT.TITLE | SWT.CLOSE | SWT.TOOL);

There are no min or max buttons displayed on the title bar. Even if
SWT.MIN or SWT.MAX were used, they still would not appear which is correct.

Right-clicking on the title bar shows the following menu items:

- Restore (greyed out)
- Move
- Size (greyed out)
- Minimize
- Maximize
- Close

The Minimize and Maximize menu items should not be there. Selecting
either causes problems. How can I disable those menu items as they should
be or prevent them from being handled? The only relevant event that I can
find is:

m_shell.addControlListener(new ControlListener()
...
public void controlResized(ControlEvent e)
...

but ControlEvent does not have a doit/cancel flag and setting the shell
size doesn't appear to have any effect.

Note that this is with Eclipse 3.0 on Windows XP SP1.
Re: Shell context menu problem [message #439244 is a reply to message #439240] Thu, 08 July 2004 13:50 Go to previous messageGo to next message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
Yikes! Please enter a problem report and I'll looking into it. The context
menu platform specific and cannot be accessed using SWT API so you can't fix
it.

"Mike Hoeffner" <eclipse@moonlightlabs.com> wrote in message
news:ccit4s$5mk$1@eclipse.org...
> I am creating a nonresizable tool shell with a title bar and close button
> using:
>
> // SWT.TITLE is unnecessary
> m_shell = new Shell(m_display, SWT.TITLE | SWT.CLOSE | SWT.TOOL);
>
> There are no min or max buttons displayed on the title bar. Even if
> SWT.MIN or SWT.MAX were used, they still would not appear which is
correct.
>
> Right-clicking on the title bar shows the following menu items:
>
> - Restore (greyed out)
> - Move
> - Size (greyed out)
> - Minimize
> - Maximize
> - Close
>
> The Minimize and Maximize menu items should not be there. Selecting
> either causes problems. How can I disable those menu items as they should
> be or prevent them from being handled? The only relevant event that I can
> find is:
>
> m_shell.addControlListener(new ControlListener()
> ..
> public void controlResized(ControlEvent e)
> ..
>
> but ControlEvent does not have a doit/cancel flag and setting the shell
> size doesn't appear to have any effect.
>
> Note that this is with Eclipse 3.0 on Windows XP SP1.
>
>
Re: Shell context menu problem [message #439246 is a reply to message #439244] Thu, 08 July 2004 14:59 Go to previous messageGo to next message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
Fixed > 20040708

"Steve Northover" <steve_northover@ca.ibm.com> wrote in message
news:ccjjdb$iuo$1@eclipse.org...
> Yikes! Please enter a problem report and I'll looking into it. The
context
> menu platform specific and cannot be accessed using SWT API so you can't
fix
> it.
>
> "Mike Hoeffner" <eclipse@moonlightlabs.com> wrote in message
> news:ccit4s$5mk$1@eclipse.org...
> > I am creating a nonresizable tool shell with a title bar and close
button
> > using:
> >
> > // SWT.TITLE is unnecessary
> > m_shell = new Shell(m_display, SWT.TITLE | SWT.CLOSE | SWT.TOOL);
> >
> > There are no min or max buttons displayed on the title bar. Even if
> > SWT.MIN or SWT.MAX were used, they still would not appear which is
> correct.
> >
> > Right-clicking on the title bar shows the following menu items:
> >
> > - Restore (greyed out)
> > - Move
> > - Size (greyed out)
> > - Minimize
> > - Maximize
> > - Close
> >
> > The Minimize and Maximize menu items should not be there. Selecting
> > either causes problems. How can I disable those menu items as they
should
> > be or prevent them from being handled? The only relevant event that I
can
> > find is:
> >
> > m_shell.addControlListener(new ControlListener()
> > ..
> > public void controlResized(ControlEvent e)
> > ..
> >
> > but ControlEvent does not have a doit/cancel flag and setting the shell
> > size doesn't appear to have any effect.
> >
> > Note that this is with Eclipse 3.0 on Windows XP SP1.
> >
> >
>
>
Re: Shell context menu problem [message #439249 is a reply to message #439244] Thu, 08 July 2004 17:47 Go to previous messageGo to next message
Mike Hoeffner is currently offline Mike HoeffnerFriend
Messages: 3
Registered: July 2009
Junior Member
Steve, there was a second followup post (id=12464) by you in this thread
but it's showing an error ("The article doesn't exist."). Can you re-post
it and/or email it if you didn't mean to delete it?

I'll post a problem report but do you have any suggestions for
workarounds? It does not have be through the standard SWT API. I'm
already using a "customized" build of SWT so changing code internal to
swt.jar/swt.dll is not a problem. Note that I have reproduced this bug
using the standard 3.0 distrib.

Are there any possible tricks using a call along the lines of:

OS.SetWindowLong(m_shell.handle, OS.GWL_EXSTYLE, OS.WS_EX_TOOLWINDOW);

Thanks,
Mike

Steve Northover wrote:

> Yikes! Please enter a problem report and I'll looking into it. The context
> menu platform specific and cannot be accessed using SWT API so you can't fix
> it.

> "Mike Hoeffner" <eclipse@moonlightlabs.com> wrote in message
> news:ccit4s$5mk$1@eclipse.org...
> > I am creating a nonresizable tool shell with a title bar and close button
> > using:
> >
> > // SWT.TITLE is unnecessary
> > m_shell = new Shell(m_display, SWT.TITLE | SWT.CLOSE | SWT.TOOL);
> >
> > There are no min or max buttons displayed on the title bar. Even if
> > SWT.MIN or SWT.MAX were used, they still would not appear which is
> correct.
> >
> > Right-clicking on the title bar shows the following menu items:
> >
> > - Restore (greyed out)
> > - Move
> > - Size (greyed out)
> > - Minimize
> > - Maximize
> > - Close
> >
> > The Minimize and Maximize menu items should not be there. Selecting
> > either causes problems. How can I disable those menu items as they should
> > be or prevent them from being handled? The only relevant event that I can
> > find is:
> >
> > m_shell.addControlListener(new ControlListener()
> > ..
> > public void controlResized(ControlEvent e)
> > ..
> >
> > but ControlEvent does not have a doit/cancel flag and setting the shell
> > size doesn't appear to have any effect.
> >
> > Note that this is with Eclipse 3.0 on Windows XP SP1.
> >
> >
Re: Shell context menu problem [message #439427 is a reply to message #439249] Mon, 12 July 2004 16:32 Go to previous message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
The follow up said "Fixed > 20040708". Please get a nightly and check it
out. Thanks.

"Mike Hoeffner" <eclipse@moonlightlabs.com> wrote in message
news:cck1be$gf6$1@eclipse.org...
> Steve, there was a second followup post (id=12464) by you in this thread
> but it's showing an error ("The article doesn't exist."). Can you re-post
> it and/or email it if you didn't mean to delete it?
>
> I'll post a problem report but do you have any suggestions for
> workarounds? It does not have be through the standard SWT API. I'm
> already using a "customized" build of SWT so changing code internal to
> swt.jar/swt.dll is not a problem. Note that I have reproduced this bug
> using the standard 3.0 distrib.
>
> Are there any possible tricks using a call along the lines of:
>
> OS.SetWindowLong(m_shell.handle, OS.GWL_EXSTYLE, OS.WS_EX_TOOLWINDOW);
>
> Thanks,
> Mike
>
> Steve Northover wrote:
>
> > Yikes! Please enter a problem report and I'll looking into it. The
context
> > menu platform specific and cannot be accessed using SWT API so you can't
fix
> > it.
>
> > "Mike Hoeffner" <eclipse@moonlightlabs.com> wrote in message
> > news:ccit4s$5mk$1@eclipse.org...
> > > I am creating a nonresizable tool shell with a title bar and close
button
> > > using:
> > >
> > > // SWT.TITLE is unnecessary
> > > m_shell = new Shell(m_display, SWT.TITLE | SWT.CLOSE | SWT.TOOL);
> > >
> > > There are no min or max buttons displayed on the title bar. Even if
> > > SWT.MIN or SWT.MAX were used, they still would not appear which is
> > correct.
> > >
> > > Right-clicking on the title bar shows the following menu items:
> > >
> > > - Restore (greyed out)
> > > - Move
> > > - Size (greyed out)
> > > - Minimize
> > > - Maximize
> > > - Close
> > >
> > > The Minimize and Maximize menu items should not be there. Selecting
> > > either causes problems. How can I disable those menu items as they
should
> > > be or prevent them from being handled? The only relevant event that I
can
> > > find is:
> > >
> > > m_shell.addControlListener(new ControlListener()
> > > ..
> > > public void controlResized(ControlEvent e)
> > > ..
> > >
> > > but ControlEvent does not have a doit/cancel flag and setting the
shell
> > > size doesn't appear to have any effect.
> > >
> > > Note that this is with Eclipse 3.0 on Windows XP SP1.
> > >
> > >
>
>
Previous Topic:SWT event-handling in separate thread?
Next Topic:MenuItem "unarm" event?
Goto Forum:
  


Current Time: Fri Apr 26 17:39:34 GMT 2024

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

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

Back to the top