Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Contributing to Text & Combo Widget Context Menus
Contributing to Text & Combo Widget Context Menus [message #197814] Thu, 19 February 2004 15:30
Eclipse UserFriend
Originally posted by: djrobd.aol.com

I have a simple ViewPart which is made up of Label, Text and Combo widgets.
I would like to add a custom action to the default context menu of Text
and Combo widgets. If I create the menu and set it to the widget it
appears behind the default context menu (See example below). How can I
contribute to the existing one or override it?

Text text = new Text(parent, SWT.SINGLE);

MenuManager menuManager = new MenuManager();
menuManager.add(new Action("Test Action") {
public void run() {
System.out.println("***TEST ACTION***");
}
});

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

Thanks for any help you may be able to provide.

Roberto
Previous Topic:3.0M7 -Error occurred during initialization of VM
Next Topic:problem wite IBM SDK 1.4.1
Goto Forum:
  


Current Time: Thu Nov 14 08:58:08 GMT 2024

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

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

Back to the top