02-15-2010 07:58 PM
I'm trying to create my own submenu that will behave like whatever RIM is using for their submenus.
I've created a submenu using an ObjectListField and a PopupScreen. I've created a MenuItem that invokes the submenu when clicked.
Here's my problem: The original menu does not stay visible when the submenu appears...so the submenu looks like a popupscreen instead of a submenu.
What do I need to override to keep the original menu visible when the popupscreen is displayed?
Here's the code I've attempted so far. This is an inner class that extends MenuItem:
public class subMenuItem extends MenuItem
{
public subMenuItem(String text, int ordinal, int priority)
{
super(text, ordinal, priority);
}
public void run()
{
Menu menu = getMenu(0);
while(menu.getSelectedItem() == this)
{
if(menu.isDisplayed() == false);
menu.show();
}
}
Ideally I'd use this to create a MenuItem that keeps the original menu visible when the submenu is displayed.
02-16-2010 11:18 AM
Bumping to the top for additional help.
Also wanted to add that I did attempt to override makeMenu on the MainScreen for which I'm creating the submenu, but when I did no menu appeared.
Thanks