Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Menu Problem
Menu Problem [message #506867] Mon, 11 January 2010 08:36 Go to next message
Niels Lippke is currently offline Niels LippkeFriend
Messages: 71
Registered: December 2009
Member
Hi,

I have a context-menu with two sequenced submenu entries. Problem is, if one
submenu is visible you cannot get the other to pop up. You need at least a
third menu item to hover on, so that the first submenu closes.

See this snippet:

public void createPartControl(Composite parent) {

Composite c = new Composite(parent, SWT.NONE);
Menu m = new Menu(c);
MenuItem mi1 = new MenuItem(m, SWT.CASCADE);
mi1.setText("Sub Menu 1");
MenuItem mi2 = new MenuItem(m, SWT.CASCADE);
mi2.setText("Sub Menu 2");

Menu sub1 = new Menu(mi1);
Menu sub2 = new Menu(mi2);

MenuItem mi11 = new MenuItem(sub1, SWT.PUSH);
mi11.setText("Item 1");
MenuItem mi12 = new MenuItem(sub1, SWT.PUSH);
mi12.setText("Item 2");

MenuItem mi21 = new MenuItem(sub2, SWT.PUSH);
mi21.setText("Item 3");
MenuItem mi22 = new MenuItem(sub2, SWT.PUSH);
mi22.setText("Item 4");

mi1.setMenu(sub1);
mi2.setMenu(sub2);

c.setMenu(m);

Regards, Niels
Re: Menu Problem [message #507136 is a reply to message #506867] Tue, 12 January 2010 09:45 Go to previous message
Tim Buschtoens is currently offline Tim BuschtoensFriend
Messages: 396
Registered: July 2009
Senior Member
Hello Niels.

You are right, it doesn't work as it should.
Please open a bug and include the snippet.

Greetings,
Tim
Re: Menu Problem [message #507144 is a reply to message #507136] Tue, 12 January 2010 05:20 Go to previous message
Niels Lippke is currently offline Niels LippkeFriend
Messages: 71
Registered: December 2009
Member
Done. Bug 299350

Thanks,
Niels


"Tim Buschtöns" <tbuschto@eclipsesource.com> schrieb im Newsbeitrag
news:hihgc3$q43$1@build.eclipse.org...
> Hello Niels.
>
> You are right, it doesn't work as it should.
> Please open a bug and include the snippet.
>
> Greetings,
> Tim
Previous Topic:InterruptedException from servlet containter thread
Next Topic:statemask in mouse events
Goto Forum:
  


Current Time: Tue Nov 30 04:15:50 GMT 2021

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

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

Back to the top