BlackBerry Forums Support Community

BlackBerry Forums Support Community (http://www.blackberryforums.com/)
-   Developer Forum (http://www.blackberryforums.com/developer-forum/)
-   -   removing Close menuitem from mainscreen (http://www.blackberryforums.com/developer-forum/148428-removing-close-menuitem-mainscreen.html)

BB1364 09-04-2008 09:16 AM

removing Close menuitem from mainscreen
 
hi

I know that when we create menuitems in a Screen the default close menuitem doesnot come, but what i want is i need some features of mainscreen and also i want to remove the default "Close" and "Fullscreen" menuitem.

Does anyone how we can achieve this.. Any ideas links will be appreciated.

Thanks in advance

goulamass 09-04-2008 09:19 AM

Make your own Menu and add your menuItem to it instead of the default menu

BB1364 09-04-2008 09:29 AM

Thanks for your quick reply

i have overidden the makeMenu () and added my own menuitems in it. But when i click the menu button in the simulator it still shows the "close " menuitem. And when i click the trackwheel it shows the "FullMenu" menuitem. Some more ideas will be really helpfull

simon.hain 09-04-2008 09:35 AM

menu.deleteAll() should help.

BB1364 09-04-2008 09:46 AM

Still not working. Here's what i hv done for the make Menu

<code>
protected void makeMenu(Menu menu , int instance) {
menu.deleteAll();
menu.add(details);
menu.add(refresh);
menu.add(MenuItem.separator(122));
menu.add(settings);
menu.add(MenuItem.separator(155));
//menu.addSeparator();
menu.add(exit);
super.makeMenu(menu,instance);
}

</code>

Any more ideas ...

ushernut 09-04-2008 10:48 AM

don't use super.makeMenu(menu,instance) in your code, just delete it.
because "close" menuitem belongs to the super menuitems.

I think you don't even need deleteAll() at the first line after you delete the super.makemenu().

BB1364 09-05-2008 12:10 AM

OOps! Still not able to remove the close and Fullmenu menuitem , it just sticks it even if i use deleteAll() and super,makeMenu().

Does anyone have any other ideas?

Thanks again.


All times are GMT -5. The time now is 02:28 AM.

Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.