SubMenu in PopUp Menu [message #47254] |
Sat, 24 May 2003 23:07 |
MorPheus Messages: 57 Registered: July 2009 |
Member |
|
|
Hi,
I want to have submenu in a PopUp Menu.I have created the SWT menu using
the menu class(org.eclipse.swt.widgets.Menu).I tried creating sub menu by
giving parent menu as argument but it doesn't show up.I also tried by giving
menu item as argument still I am not able to get it.I also tried setting
Menu.setVisible(true) but in vain.
How to do solve this problem.
Here is the snippet
//snippet
public RateManagerPocD220503V01PopUp(final Composite parent, final
RateManagerPocD220503V01Book editorBook) {
menu = new Menu(parent.getShell(),SWT.POP_UP);
cut = new MenuItem (menu, SWT.CASCADE);
clearContents = new MenuItem(menu,SWT.CASCADE);
subMenu = new Menu(clearContents);
subMenuItem = new MenuItem(subMenu,SWT.PUSH);
cut.setText("&Cut");
copy.setText("Copy");
clearContents.setText("Clear Contents");
parent.setMenu(menu);
}
//End of Snippet
MorPheus
|
|
|
Powered by
FUDForum. Page generated in 0.07863 seconds