Close the menu by code

Hi all

My app has a screenshot of this self, but this option is available in the menu. The screenshot includes the menu.

Is it all the same closing the menu in the code?

I tried getMenu (Menu.INSTANCE_DEFAULT) m:System.NET.Sockets.Socket.close ();

but no joy.

Please help - losing hair rapidly.

Found the answer, repaint the screen

UiApplication.getUiApplication () .repaint ();

Tags: BlackBerry Developers

Similar Questions

  • How to close the menu that is opened when you click on the menu button?

    Hello

    When the user clicks the menu button, menu appears.

    Now menu is not closed & my screen behind the menu is updated due to a callback function.

    So, I want to update my menu again accordingly.

    How can I update this menu or close the menu which is open?

    Is it possible to dindane who?

    Yes... His work.

    I tried compact as well, but it did not work in multithreading where I wanted to close the menu on the response of one or two wires.

    It was necessary to aquire lock application event to close the menu in this senario.

    Thnx, it is now resolved...

  • We lose the choice to close the menu accordion initially.

    After the update. I'm not able to close the menu accordion, and I see not option close to departure. Thanks for the help.

    http://www.highestgoodclothing.com/_blog/Highest_Good_Clothing_Blog

    Before the update from the acrive tab was closed initially.

    "Close it all initially" option in the Panel of the accordion has been replaced by the new behavior that allows an accordion to be reduced in Design view. Refer to the notes of version 4.0 of Muse on the next page for more information on this and other improvements of Widget - http://helpx.adobe.com/content/help/en/muse/release-note/adobe-muse-release-notes.html

    So in your case, you just have to activate the option 'Can close all' for the accordion panel (if it is not enabled already) and close it in Design view in so she can be reduced by default on publish. This is another improvement in widget panel in this version where the Panel selected in Design view will now be selected/active when previewing, export or publish the site on Business Catalyst.

    Thank you

    Vinayak

  • Close the Menu that appears

    I have a 'A' screen with a button that when you press shoot another screen 'B' in the stack. My problem is that when I click on the button control is not immediately transfer to screen 'B '. Instead, the menu of the display 'A', which has only a single element: "Close". This menu selection calls the onClose() method, which puts an end to the application.

    My first problem is that I do not understand why the menu of the display 'A' makes its appearance when I 'B' screen in the stack. I want to transfer control to the screen 'B' and do not see the menu [for the display 'A'] appears at all.

    Help someone?

    Thank you.

    You must add the CONSUME_CLICK style for your button.

  • Can close the menu being hiden or override?

    Generally, the close menu item will close only the current screen. I want to now that he works for leaving the game. It is possible to replace this menu item. If this is not the case, can I hide it?

    Thank you very much!

    You can override the makeMenu() and add a narrow menu allowing to leave your application instead of using the default menu.

    And also overrire method onclose() If you want to do anything when you press ESC.

    Something like:

    import net.rim.device.api.ui.*;import net.rim.device.api.ui.component.*;import net.rim.device.api.ui.container.*;
    
    public class TestScreen extends MainScreen{    public TestScreen()     {        super();                    }
    
        // menu item for exit the application            private MenuItem exitMenu = new MenuItem("Close",100,10)    {        public void run()        {            System.exit(0);        }          };
    
        protected void makeMenu(Menu menu, int instance)    {                menu.add(exitMenu);
    
            // default menu        //super.makeMenu(menu, instance);    }
    
        //it will close the current screen    public boolean onClose()    {        this.close();        return true;            }        }
    

    Concerning

    Bika

  • Cannot close the menu copy so we can print with the Photosmart C4580

    HP Photosmart C4580 all-in-One

    By mistake, we hit the button settings label number 3.  We do not have memory installed maps.  The instructions say that this:

    Otherwise, this button opens the copy settings menu.  Our problem is that we cannot close this menu so that we can print.

    We followed a hot and cold reset reset procedures without result.  The User Guide does not mention how to close this setting.

    So, we can now use the printer.  Can someone help us please?

    Thank you very much in advance,

    Yours,

    Sky22

    As I mentioned in the first post, I tried the hot and cold nothing works reset procedures.  I finally came to my senses and remove the printer and let windows 7 install the drivers again.  Then it worked.  I should have done that right away.

  • My MacBook Pro with El Capitan 10.6.11 close the menu drop down. I have to turn off the power

    The closing down and options no longer work in El Capitan 10.6.11 restart on my MacBook Pro mid-2012. I have to press the power button to turn off.  When shutting down or restarting are selected, the Ribbon at the top of the screen disappears and Finder is no longer available but other aps on the bench of the accused are still available. When I restart after turning off the power, the system is back to normal until I need to close again.

    Hello

    Just in case, run disk utility.

    Open utility disk located in Applications/Utilities

    Then select the disk to boot on the left and then select the first aid tab and then click run.

    If disk utility indicates that the disc seems to be OK, you are finished. Otherwise, you must repair the disk.

  • How close or minimize the menu box using Display.screenshot ()?

    Hello

    Did someone help out me in finding what way I can minimize or close the menu box while I take the screenshot of any screen?

    The problem is when I select the menu item Printscreen, the Display.Screenshot () method runs, and it takes the screenshot including the menu box that I opened for the selection of the menu-item (Printscreen).

    So, how to remove that box of Menu before you take the screenshot?

    Please answer

    Thank you.

    You might find some useful options in this thread;

    http://supportforums.BlackBerry.com/T5/Java-development/context-menu-coming-in-screenshot-by-using-D...

  • Need help to apply the menu option

    Hello

    you will need to apply the menu option by clicking on 'V' image and close the menu option by clicking on the image itself. I did everything but not able to do this menu option can you please help... I have attached my code

    I have

    Have you tried the code that I wrote for you?

  • Close the box of

    I think I have everything but a function works on my PopstyleWeb and that one thing is likely to mean a major change. If I click on the menu header, that the drop down menu opens, if I chose something disappear, or if I let go of the cursor outside the drop-down list, it closes. It's all great. But what happens if I opened the drop down by clicking on the header menu and decide there is nothing that I want. How close? If I click anywhere else on the stage, it remains open. When I click on the header I put a parameter to true and when I click on something it becomes false. It is to open and close the menu. How to make it false if I click on the scene or click again on the header menu. I try to get the drop-down lists like most programs (Word, Director), except that I want mine in the middle of my scene and made with the sprites. How do these menus work! Once you click on a header menu Manager menu remains open and if you move the mouse over the menu as it opens and closes the one you were. Is there a tutorial somewhere that we show how these standard drop down menus?

    I don't know how you have your settings of codes, so I'll just throw this
    here in the hope that it helps. If I did that, I would have a
    Manager to open a menu and a Manager to close on the sprites that are
    responsible for the menu.

    on openMenu me
    sendAllSprites (#closeMenu)
    -your code here to open the menu
    end

    on closeMenu me
    -your code here to close the menu
    end

    This line of sendAllSprites in openMenu() Manager will automatically
    close any menu before opening another. If you have not a
    Manager dedicated to open the menu, you can create just the
    sendAllSprites in your code just before the point where a menu Gets
    opened.

  • Detect when the menu is opening and closing

    Hello

    In my application, I use the ESC key to return to the previous screen.

    The problem is when to press the MENU button, a menu appears, and it must be able to use the ESC key to close the menu (if he wants).

    So, I would detect when the menu is opened and when the menu closes, I can manage the ESC to go back screen or simply to close the menu.

    Is it possible to do this?

    Thanks in advance

    Hai

    Do not use keylistener.

    Override keyChar() in your screen and locate the ESC key.

  • Request to close class (without GUI) app via the Menu - help please!

    Hello everyone, as you can see I took the sample application for the execution of a background application and adds a system-wide menu. The question is how can I properly close the application via the menu.

    I just moved from the C++ so mental conversion to Java is running (learn a lot of new ways to cause exceptions in a whole new language)

    Any help would be appreciated, I've seen the question several times with no response or vague answers and no code to back it up.

    Thank you!

    /**
    * GUILessApplication
    *
    * A sample application that appears on the Ribbon
    * but has no user interface.
    */

    package guiLessApp;

    Net.rim.device.api.system import. *;
    Import net.rim.blackberry.api.menuitem.ApplicationMenuItem;
    Import net.rim.blackberry.api.menuitem.ApplicationMenuItemRepository;

    / public final class GUILessApp extends Application
    {
    public static BackGroundApp backGroundApp;
             
    Public Shared Sub main (String [] args)
    {
    PAP GUILessApp = new GUILessApp();
    theApp.enterEventDispatcher ();
    }

    public GUILessApp()
    {
    Creates and starts a new thread BackGroundApp.
              
    backGroundApp = new BackGroundApp();
    backGroundApp.start ();
                       
    MyMenuItem myMenuitem = new MyMenuItem (17);

    ApplicationMenuItemRepository
    .getInstance (.addMenuItem)
    (ApplicationMenuItemRepository
    . MENUITEM_SYSTEM, myMenuitem);
    }
        
    The thread that is running in the background.
    SerializableAttribute public class BackGroundApp extends Thread
    {
    Boolean stopThread = false;
    public synchronized void stop()
    {
    stopThread = true;
    }

    public void run()
    {
    While (! stopThread)
    {
    You must run your treatment here.
    This example prints just one line
    in the output window BlackBerry JDE
    System.out.println ("Application is running");

    Sleep for 5 seconds to avoid the
    application to run out of control
    Try
    {
    Sleep (5000);
    }
    catch (System.Exception e)
    {
    Exception handling would be here.
    }
    }
    }
    }
    Stop the thread to exit.
    protected void onExit()
    {
    backGroundApp.stop ();
    }
    }

    class MyMenuItem extends ApplicationMenuItem {}

    using default constructors here.
    MyMenuItem (order int) {}
    Super (Order);
    }

    We must implement methods
    Run is called when the menuItem is called
    public Object execute (object context) {}

    do something here

    return the context;
    }

    toString must return the string that we want to
    use as a marker of the menuItem
    public String toString() {}
    return "Close App";
    }
    }

    Perfect!, just it sorted and it works like a charm.

  • close the video stream and take me to the menu

    I can play video. the menu pleasant reading. that good. in any case, I need to close. while I can go menu and select another video.

    Btn1.addEventListener (MouseEvent.CLICK, fl_MouseClickHandler);

    function fl_MouseClickHandler(event:MouseEvent):void

    {

    Video: video of var = new Video (stage.stageWidth, stage.stageHeight - 50);

    stage.addChild (video);

    var nc:NetConnection = new NetConnection();

    NC. Connect (null);

    var ns:NetStream = new NetStream (nc);

    NS.client = {onMetaData:ns_onMetaData, onCuePoint:ns_onCuePoint};

    video.attachNetStream (ns);

    NS. Play ("intr.flv");

    function ns_onMetaData(item:Object):void {}

    trace ("Metadata");

    }

    function ns_onCuePoint(item:Object):void {}

    trace ("cuePoint");

    trace (item.name + "\t" + item.time);

    }

    function closeVideo() {}

    NS. Close();

    Video.Clear ();

    How can I go to the menu

    }

    }

    menu.jpg

    'Add' this code does not replace:

    Stop();

    Video: video of var = new Video (stage.stageWidth, stage.stageHeight - 50);

    Btn1.addEventListener (MouseEvent.CLICK, fl_MouseClickHandler);

    function fl_MouseClickHandler(event:MouseEvent):void

    {

    stage.addChild (video);

    var nc:NetConnection = new NetConnection();

    NC. Connect (null);

    var ns:NetStream = new NetStream (nc);

    NS.client = {onMetaData:ns_onMetaData, onCuePoint:ns_onCuePoint};

    video.attachNetStream (ns);

    NS. Play ("intr.flv");

    function ns_onMetaData(item:Object):void {}

    trace ("Metadata");

    }

    function ns_onCuePoint(item:Object):void {}

    trace ("cuePoint");

    trace (item.name + "\t" + item.time);

    }

    }

    closebtn.addEventListener (MouseEvent.CLICK, fl_MouseClickHandler_2);

    function fl_MouseClickHandler_2(event:MouseEvent):void

    {

    NS. Close();

    Video.Clear ();

    {if (Video.stage)}

    video.parent.removeChild (video);

    }

    }

  • HTML code to close the window without asking confirmation

    Hi all

    You can just anyone to correct me the following code to close the window without any warning and exit the menu.

    < html >
    < head >
    < script type = "text/javascript" >
    var windowClose = window.close;
    Window.Close = function)
    {
    Window.Open("","_self");
    windowClose();
    }
    < /script >
    < / head >
    < body onload = "window.close ()" >
    Please close/quit immediately this browser session.
    < / body >
    < / html >
    I used the following code to run the file close.htm
    Web.show_document('/forms90/html/Close.htm','_self');
    Arif

    Published by: Arif-8873427, January 16, 2011 12:04 AM

    .....





    Key-release Trigger:

    WEB. SHOW_DOCUMENT ('http://webserver:7778/urlapps/close.html','_self');

    Edited by: alinzenb the 17.01.2011 09:58

  • Firefox opens in view full screen. Is there a get way to display menu bars? I have now to close the progrram and start over.

    Firefox opens in view full screen and no Firefox menu bar is visible or all icons appear at the bottom of the screen (not even the "Start" icon. I tried pressing ESC. Nothing happens. I tried right click, but none of these options provide all assistance. When I need to go back to any other program, I press Ctrl/Alt/Del and close the Firefox program. I'm sendis Internet Explorer message.

    Press F11.

Maybe you are looking for