Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » How do I get a menu item to refresh?
How do I get a menu item to refresh? [message #777183] Mon, 09 January 2012 20:37 Go to next message
Eclipse UserFriend
I have an ArmListener on a menu item so I can update the menu item text (or it's enabled state) when it's about to be shown.
The problem is that it displays with it's "old" text/state - until the mouse rolls over it. THEN it updates to the state/text I set.

So, how do I get it to immediately update?
Re: How do I get a menu item to refresh? [message #777409 is a reply to message #777183] Tue, 10 January 2012 07:51 Go to previous messageGo to next message
Eclipse UserFriend
SWT.Arm is fired on the menu item when the mouse rolls over it. Sounds like that it what it is doing, just not what you want?

The containing Menu will get an SWT.Show even just before it opens, and that's what code like the MenuManager uses to update its contained MenuItems just before a menu appears. Is that what you want?

PW
Re: How do I get a menu item to refresh? [message #777436 is a reply to message #777409] Tue, 10 January 2012 09:08 Go to previous messageGo to next message
Eclipse UserFriend
Very likely! Thanks.
None of the examples I found showed that, and the javadocs tend to be rather terse.
Re: How do I get a menu item to refresh? [message #777459 is a reply to message #777436] Tue, 10 January 2012 09:47 Go to previous message
Eclipse UserFriend
For a similar example see
http://git.eclipse.org/c/platform/eclipse.platform.swt.git/tree/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet73.java
..

Grant


On 1/10/2012 9:08 AM, Missing name Mising name wrote:
> Very likely! Thanks.
> None of the examples I found showed that, and the javadocs tend to be
> rather terse.
>
Previous Topic:[re-opened] Order of mixed 'action' and 'command' menu items in RCP
Next Topic:SSL through RCP application
Goto Forum:
  


Current Time: Fri Jul 25 18:32:56 EDT 2025

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

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

Back to the top