Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » problem with context menu
problem with context menu [message #515090] Wed, 17 February 2010 16:56 Go to next message
bogdan toma is currently offline bogdan tomaFriend
Messages: 39
Registered: February 2010
Member
Hello all,
I have this code with creates a context menu for a Text widget.

 
        final Text text = new Text(parent, SWT.MULTI);
        text.setText("Seconds away");
        final MenuManager menuManager = new MenuManager();
        menuManager.add(new Action()
        {

            @Override
            public String getId()
            {
                return "test";
            }

            @Override
            public String getText()
            {
                return "text";
            }

            @Override
            public void run()
            {
                new MessageBox(parent.getShell(), SWT.OK).open();
            }
        });

        final Menu menu = menuManager.createContextMenu(text);
        text.setMenu(menu);


- when I do right-click on Text widget the context menu appears.
- when I left-click on Text widget the context menu remains opened until I choose one of the options or until I do a click outside the Text widget.
In RCP(using JFace/SWT) when I click on Text widget the context menu closes.
I am using RAP1.2 and Firefox 3.5.7.
I saw the qooxdoo 0.7 has a autoHide property for menus.

Am I doing something wrong ? Or is it a limitation of RAP ?
Thank you.
Tommy
Re: problem with context menu [message #515107 is a reply to message #515090] Wed, 17 February 2010 17:37 Go to previous message
Rüdiger Herrmann is currently offline Rüdiger HerrmannFriend
Messages: 581
Registered: July 2009
Senior Member
This was a known problem and is fixed in the 1.3 development stream. See
here for details:
287314: [Menu] Context-menu does not always close on click
https://bugs.eclipse.org/bugs/show_bug.cgi?id=287314

Regards,

--
Rüdiger Herrmann
http://eclipsesource.com

On 17.02.2010 17:56, bogdan.toma wrote:
> final MenuManager menuManager = new MenuManager();
> menuManager.add(new Action()
> {
>
> @Override
> public String getId()
> {
> return "test";
> }
>
> @Override
> public String getText()
> {
> return "text";
> }
>
> @Override
> public void run()
> {
> new MessageBox(parent.getShell(), SWT.OK).open();
> }
> });
>
> final Menu menu = menuManager.createContextMenu(text);
> text.setMenu(menu);
Previous Topic:SWT Layout resizable
Next Topic:Is there any documentation for the JavaScript org.eclipse.swt.Request-Object?
Goto Forum:
  


Current Time: Sun Oct 13 08:47:15 GMT 2024

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

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

Back to the top