Remove the screen on the menu Manager, click

Currently I have a screen, the user can bring up the menu and select an option that displays a series of buttons in a fieldmanager.  It works very much like on click menu create and add buttons to the Manager then the screen.  I want to do now is if the user selects an option in the menu to delete the buttons I'd remove the screen Manager.  I'm trying to do the following (taken from another thread)

   private MenuItem _hideGraph = new MenuItem("Hide graph",110,10)
    {
        public void run()
        {
            try{
                UiApplication.getUiApplication().invokeLater(new Runnable(){
                    public void run()
                    {
                        synchronized(UiApplication.getEventLock()){
                        delete(gridFieldManager);}
                     }
                 });
            }catch(Exception er){
                System.out.println(er);
            }
        }
    };

A mistake is not printed, but made a mistake.  Is it possible to remove the handler in this way?

initialize in the constructor of your display manager, for example. Another option would be to return, but I prefer the first one for a better overview.

in your case:

declare the handler as a class variable in the class of your screen. initialize it in the constructor. Add and remove it from your menu methods.

a general Council: instead delete, you can use replace. at least if you use several insertion/removal routines you can lose the correct index quickly, and if you add a field then rewriting half of your code. for this reason I use a NullField who is not active, I add them to the places where I want to dynamically insert managers.

Tags: BlackBerry Developers

Similar Questions

  • remove the menu bar on the secondary monitor

    We use 2 monitors. We have upgraded to El Capitan and must be able to remove the menu bar on the top of the secondary computer.

    How can I do this?

    its been a while but it might be:

     > System Preferences > Mission Control

    turn on "screens have separate workspaces.

    and then disconnect you and back in.

  • How to remove the menu display keyboard?

    Hello..

    I designed a screen with the orientation of the device. When the user showing the virtual keayboard, my design of the screen gets collapsed. There is no editfields in my screen. So I want to remove the menu "show keyboard" from the menu list.  I tried NO_SYSTEM_MENU_ITEMS in the screen. But it deletes the menu "Switch application" also. I want to just remove the "Show keyboard" only... Please help me...

    Thank you...

    Hi razebond,

    The virtual keyboard, in particular, to get a handle on virtual keyboard designated screen as shown in the following document:

    http://docs.BlackBerry.com/en/developers/deliverables/13222/Displaying_touch_screen_keyboard_647781 _...

    From there, you can call VirtualKeyboard.setVisibility (VirtualKeyboard.HIDE_FORCE) to disable the virtual keyboard; in turn, this will remove the menu item.

    Alternatively, you can override the method makeMenu() of the screen and use a loop in collaboration with Menu.getsize () to iterate through the items in your Menu and find the item with the text display keyboard. Once found, you can call Menu.deleteItem (int position) on the location of the item display keyboard .

    This deletion would better follow a call to super.makeMenu (menu Menu, int for example) to ensure that the Menu has already been filled.

    In your case, the recommendation would be to completely disable the virtual keyboard as it is a much cleaner approach.

    Erik Oros

    BlackBerry Development Advisor

  • Remove the display manager

    Hello to all the community ! I hope I can find help here, I want to remove a handler of my screen because I'm painting information in the same screen, I have 2 ways to view the information (News), the first is 1 notice in time, in what I'm showing an image, the title of the notice, the date and description, the second is a list of all reviews I can show the first option I can change for the second option, no problem, the problem is that when I want to change the first option again, I have this message: java.lang.IllegalStateException: field added to a Manager if it is alreadyparented, I guess I have to remove the main Manager, because I use it to paint the information, can someone help me please.

    Welcome to the forums.

    Don't forget that managers can be and are used recursively, to remove all, you must remove the field directors and managers of their managers.

    You should be able to determine the field that threw the IllegalStateException, and of that number on that delete, you did not.

    You can also use . getManager() to find out if a field is related, and then remove it from the Manager identified if you want to reuse the field.

  • How to remove the menu bar of the last update of itunes?

    The little square that used to appear on the top, isn't there anymore, so I can't go there to remove the menu bar that appears under the player. Before the update, the menu and the options were in a little square on top (left) and you could turn on and turn off the menu bar there, but now that I updated Itunes, that square doesn't appear anymore, and the menu bar just stays there. I tried everything to remove it but I don't know how. It kinda bugs me seeing the menu bar there since i'm used to just have it in that little square on top.

    Can you please take a screenshot, using shift + command + 4 (the cursor will turn into crosshairs), to draw a rectangle around what say you all?  I can't follow what you describe.

  • How to create the scroll to the menu icon click event bar

    How to create the scroll to the menu icon click event bar

    (as the "field of scrolling image")

    In my opinion, it is better for you to try something to help implementation of your solution to ask for the code.

    For example, create a few BitmapFields with icons that act as buttons.  There is source for this sort of thing on the forum if you look at, I think, looking FRO Image button, icon or Bitmap button.

    Once you have these buttons work, add these in a HorizontalFieldManager.

    Good luck.

  • Remove the button 'Manage the catalogue' answers

    How can I selectively remove the button "Manage catalog" answers for members of certain groups of catalog?

    You can't remove the button, you can control only what the user is allowed to do in the catalog.

    concerning

    John
    http://obiee101.blogspot.com/

  • Can not remove the use right click menu in XP

    If I try to right click on the name of the file in the menu drop-down (favorite or content of the record) I get endless hourglass, drop dwon containing DELETE appears, but I'm not allowed to select delete while the hourglass is running.  Finally, everything stops but no way to delete. Help, please!  Thank you!

    Hi DrewWatson,

    ·         Do other options in the menu drop-down work well?

    ·         The delete option is greyed out?

    ·         Since when are you facing this problem?

    ·         The overall performance of the computer is fine?

    Step 1: Try to start the computer in Safe Mode to check the issue. It could be a third-party program that could cause a problem.

    Step 2: If no problem occurs then try to perform a clean boot in order to find the cause of the problem. The following article should guide you on the exact path of troubleshooting.

    Perform a clean boot to determine if background programs interfere with your game or program

    Note: Make sure that you put the computer to a Normal startup once you are finished.

  • There is no ' bookmark in the bookmark from the menu Manager drop-down

    the firefox help tutorial, quote ' to open the bookmark manager, select Bookmarks > manage bookmarks. It shows 'manage bookmarks' immediately below to "bookmark this page". The drop down menu on my firefox lacks the statement 'manage bookmarks' in the menu. I'm on firefox 3.6/win vista. and I find it difficult to organize my favorites. Any help would be appreciated.

    I thought that he went too; It is now called "show all bookmarks".

    Try: Going on the file Menu, click Favorites, click Show all bookmarks. This should bring up the Manager of bookmarks (ps. I learned that it is good to save!).

    I hope this helps.

  • How to remove the menu open-link browserfield

    I using hv browserfield for the ad, I hv to invoke the browser, set to protocolhandler
    (I have defined hv navigation mode - circumflex)

    but clicking on this first screen menu as open the link, I want to open the link directly it how can I do?

    Hi Pierre,.

    Try the override of the method onMenu() of the screen and iterate over the menu item, if the text of the menu item "Open link" as the run() call this menu item method.

    Something like this:

    {} public boolean onMenu (int instance)
    If (instance == Menu.INSTANCE_CONTEXT) {}
    Recover main menu
    Menu MainMenu = this.getMenu (Menu.INSTANCE_DEFAULT);

    numItems int = mainMenu.getSize ();
    for (int i = 0; i)< numitems;="" i++)="">
    CurItem MenuItem = mainMenu.getItem (i);
    String name = curItem.toString ();
    If ("Open Link".equals (name)) {}
    curItem.run ();
    break;
    }
    }
    Returns false;
    } else
    Return super.onMenu (instance);
    }

    So resolute thn press Bravo.

  • How to remove the Access Manager

    Can someone tell me how to remove the Manager of my computer it makes me crazy that I can't do anything online without entering the password anywhere from 10 to 15 times and sometimes more.

    Thank you

    Hi DeannaKing,

    Thanks for posting your query in the Microsoft Community Forums.

    I understand from the description of the problem you are getting pop-ups on the Windows 7 computer access Manager.

    Please provide more information on this issue.

    1 have you ever had the password?

    2. you are the administrator of the computer?

    3. what browser you use on the computer?

    If you use Internet Explorer see the steps.

    Access Manager is a tool that blocks or allows websites specific, based on the ranking of the site content.

    You can disable content advisor by following these steps.

    (a) open Internet Explorer. Go to tools and click on Internet Options.

    (b) select the tab content and here if your Content Advisor is enabled, you will find a button to turn it off.

    (c) click on disable.

    Check out the link:

    Internet Explorer Content Advisor: Frequently asked questions

    http://Windows.Microsoft.com/en-us/Windows7/Internet-Explorer-Content-Advisor-frequently-asked-questions

    It will be useful.

    Let us know if you encounter problems under windows in the future. We will be happy to help you.

  • How can I remove the menu from the menu bar?

    I'm new to Muse CC, I have 6 items in my menu bar, now I need to delete the one tried, but I couldn't achieve this please notify

    If you are would be to remove all "with the content" go the outline view and click the little x at the top right of the thumbnail of the page. If want to exclude the page from the menu its so easy click, right-click on tap site map page, then choose from the menu. then choose the first option there "exclude page in the menu.

    hope this finds you well,

  • Error 1162 occurring when you remove the menu item

    I am creating menus personalized in the MenuBar of a VI in LabVIEW 2010 and always 1162 error when I try to delete the entry "Rename the folder of screws" on the file menu. I can remove the entire menu and add it back to accomplish the removal, but I intend to keep some of the functions of the application level such as ' save under... ». Anyone has an idea why this happens? I tried to delete by name, (the two app_Rename the screw folder and rename folders of screws) and by number. Neither work. I have attached a screenshot of the VI and the error.

    Lenovo Think Center (core i7) M series computer

    under Windows XP

    Thanks for any help,

    Chuck

    I think that it is a tag mismatch too. Try to run Get Menu Item Info primitive by specyfing tag item 'app_File', then make sure that the output array "tags submenu" includes a string that you assign to remove.

  • Recipient, does not not on the menu right click send to

    After multipliable attempts to upgrade Windows 7 to 10 (still on 7, not even go there!) the recipient of the mail in the menu send to stopped working. I followed the instructions on the other posts to restore, but have now lost the recipient of the message option in the menu. When I open the MailTo, my new entry of the recipient of the message file (created by following the instructions is other posts) is there, but does not appear when just by clicking on a document and will SentTo.

    Any help would be greatly appreciated.

    Hello

    Thanks for the reply.

    I suggest you to re-post your query on the Forums of office for assistance on this issue.

    Check out the link:

    http://answers.Microsoft.com/en-us/Office

    Hope this information helps. Please let us know if you need any other help with Windows in the future. We will be happy to help you.

  • Remove the menu default ButtonField

    Hi all! As you know, or not , I am new to the blackberry development. I want to know how to remove the default menu that is shown when the user presses a ButtonField. (This show 3 options in the Simulator menu: hide the keyboard, move the application menu, complete.)

    Create your ButtonField with the CONSUME_CLICK style bit (and throw in NEVER_DIRTY, as well for good measure - it has a meaning in most cases).

Maybe you are looking for