Prevent the onClicked if the context menu is open

I added a context menu to a button.  The problem is that the buttons still gets clicked even if the context menu is opened.  As my button opens a new page, it would be confusing.

How can I prevent the button is enabled when the context menu is visible?

Thank you

The simplest way is to set a Boolean flag in the crack of visualStateChanged() which is read by your location of onClicked() of buttons and acted accordingly...

http://developer.BlackBerry.com/native/reference/Cascades/bb__cascades__contextmenuhandler.html#func...

It said that change the default action for a button that invokes a context Menu is a UI change that will confuse a user and you're better stick to the UI guidelines.

How did the user knows to long press your button?

Tags: BlackBerry Developers

Similar Questions

  • How to prevent the context menu?

    I have a view of the image that has a context menu that are associated with, and I have a slider that is in addition to that view.

    When I set the cursor, if my finger is placed on a spot for a while, the context menu of the display of the image is raised.

    It is very undesirable.  Is there a way to prevent the opening if the cursor is in interaction with the context menu of the image?

    You can interrupt the opening from the popup menu.

    Here is an example of my code, replace 'condition' by your own condition:

    contextMenuHandler: ContextMenuHandler {
         onPopulating: {
            if (condition) {
               event.abort();
             }
          }
    }
    
  • Open no longer appears in the context menu

    I'm under WinXPSP3.  My main administrator account has 'open' at the top of the context menu for applications and shortcuts.  However, other accounts have 'Run As.... "as the only option ('Open' is nowhere in the context menu).  I have DEP off, but it seems to make no difference, given that the "Run As" dialog box... "appears whenever an application or a shortcut is executed.  Any ideas how to get the context menu item 'open' to reappear and to get it so that the action by default when double click on an icon or select an icon in the menu programs?  Thank you.

    Try the steps of
    http://www.TomsHardware.com/Forum/19967-45-open-with-missing-click-Windows

  • I use Firefox for a kiosk application. Can I disable the context menu and zoom?

    I use Firefox for an application kiosk on a touch screen monitor. I will prevent users from interacting with the browser interface. Is there a way to do this? Disable the context menu and zoom for the touch gestures could prevent users from getting into a State where they are unable to use the application.

    Hi TrevorTubbs, you can disable the zoom in the browser with the method described in http://kb.mozillazine.org/Locking_preferences & locking these preferences:

    lockPref("toolkit.zoomManager.zoomValues"; "1");
    lockPref("zoom.maxPercent"; 100);
    lockPref("zoom.minPercent"; 100);
    

    I'm not sure if disabling the context menu...

  • How to customize the context menu in the legend of plotting the graph of wave?

    I am currently on the creation of a simulation of various control loops as educational objectives. Here, I have a chart in waveform to different signals. Now my question, how to customize the context menu in the track of the Waveform graph legend => when I click on 'image' behind the Plotnames one menu to open options where you can customize the color etc. or plotwidth. But students should not have access to these settings. How can I change or disable this menu? The context menu for the waveform graph, I've already customized by right click on table of waveform-Advanced online-online menu, but for the legend of conspiracy, I have not found this setting...

    Thanks for your answers... I tried different things, but I don't see a solution yet :-(

    See you soon

    DCP

    Hi, STC,

    There have been a number of suggestions for change or disable the table , right-click menu, but I see that this does not affect the context menu of legend , which is what you ask for help with.

    To prevent completely the menu right-click to work, you must disable the chart control entirely. You can do this by double-clicking on the chart and select Advanced Options > active state > disabled. This will prevent the operator to be able to generate a menu right click on the chart control.

    If however you still wanted the table, make a right click menu to work, but the legend made a right-click menu will be disabled, I see two options:

    1. draw a classic decoration square on the legend and the transparent color. This will prevent the mouse clicks to achieve the legend, and transparent it will not interfere with your user interface appearance.

    2 use a Structure of the event to capture the event filter Popup Menu of Activation?  for the chart control. You can then use the Coords property to determine if the mouse is over the legend or not. If this is the case, send faithful away? right Terminal. It will refuse the context menu when the user clicks on the legend of the plot.

  • How to add "Look it up in lexicon" to the context menu?

    Hi all! The title says it is in fact... When I highlight a word in a text donnΘ, is possible to add an item to the context menu - > search in the lexicon or Contextual menu - > Services - > search in the lexicon (or whatever it may be called).

    I mean by local "lexicon" built in the dictionary as part of Mac OS (El Capitan in my case).

    Any help will be greatly appreciated!

    Try to open system preferences > keyboard, look in the tab shortcuts.

    Title services in the sidebar, there should be a section 'search' with an option to activate the context menu item 'search in the dictionary'. Allow it to appear in the right click menu "contextual".

    p.s. This is an earlier operating system, it may have changed.

  • Just updated to 38.0.5 and now when I right click on a bookmark to edit, the context menu is grayed out and it won't let me. Why?

    I read a lot of web comics, so I change the bookmarks for them on a daily basis on the last page on each site. I just tried to do that tonight after you install the 36.0.5 update, now when I right click on the bookmark in the menu, I have yet to get the context menu, but all the options are greyed out. He was most certainly not in this way the last night before the update. That is what it is?

    Oops, it's probably the bug to customize. After using customize it, most of the items on the context menu are gray to the bookmarks Menu in the classic menu bar.

    It does not affect the button drop-down bookmarks menu *, and it does not affect the bar Favorites (Ctrl + b). And if you launch a new window (Ctrl + n), he works on the menu bar, too. Very strange.

    I don't know when this is going to get it fixed but at least you know a few places to access the properties for the moment.

    Which doesn't seem to be the problem?

    One on the taskbar near the star

  • The context menu 'this framework' is missing

    There are two users in question, the two Firefox running on Windows 7 36.0.1. When right clicking on a frame in a Web site, they have a context menu option 'the framework', echoes cascading on to provide various actions you can take (this frame printed, etc.). The other user doesn't have this option. To the best of my knowledge, the two users are running installs similar: the default collection of plug-ins that are enabled in our enterprise environment, they do not have twisted all topic parameters: config, etc. Why 'This framework' context menu would only not available for one of them? Is there a way to force be activated?

    I found it...

    I re-read your posts tonight and spent some time tinkering with Firefox on my machine at home (36.0.3 on Win8.1). I was watching my mailbox in OWA, which has a shared mailbox added as well. I discovered that the messages in the shared mailbox Inbox had the option of this framework in the context menu, while the Inbox has no messages in my personal mailbox.

    A little back of comparison and I finally noticed: display the list of my Inbox is configured to display Conversations by Date (see screenshot). However, the shared mailbox Inbox had the Conversations view option deselected.

    When the Conversations view option is disabled, OWA displayed each message in the reading pane in a frame. In Conversations mode, it seems to use CSS for the reading instead of this pane.

    Thank you for your help is in the right direction.

  • Firefox won't let me copy the web address of the bar using the context menu with the second mouse button or trackpad to address

    Hello!

    I am writing to report a problem I have with the new patch v35 and v35.0.1 Firefox address bar

    With the new version 35 of Firefox on Mac OSX Yosemite, clicking with the right mouse button in the address bar to copy the web address, a context menu DO NOT allowed to copy the link, he shaded in grey, inactive... you click on an other browser zone before returning to click a second time and be able to copy the link in the context menu

    I mean, with the first right click on the menu bar that appears to address do not allow me to copy the link directly, you must click another area and then click again with the right mouse button in the address bar to copy the Internet address (happens to all pages)

    I tried to open Firefox plugins and completed inactive and reset Firefox on first use (as the first installation) and the problem is here again... The problem with or without add-ins and plugins is here

    What happens before and then when I format my computer

    Here I put a screenshot that explains the problem better than my words
    http://i.imgur.com/QxKd8P1.gif

    I hope you can help me

    Hello

    I want to just inform you that with the new version 36 of Firefox, this problem has been corrected in my browser
    Now I can access the copy option in the context menu directly in the address bar
    Thanks for the replies

  • Make a right click on the e-mail list no longer opens the context menu.

    Hello world
    Thunderbird collapsed to display the context menu on the mailing list recently. Make a right-click displays just the cross line. What is the problem could be?
    Thanks anyone for any help.

    Win 8.1 64
    Thun 31.3.0

    Very strange.
    Make a right click on the email list should open a menu drop-down.
    Usually a line crossed through something means that it is marked as deleted in an imap e-mail account.

    See if there is a conflict with an add-on.
    Restart Thunderbird in safe mode.
    Help > restart with disabled addons.

    then run the same test; Right click on the email list.
    Do you get the drop down, if so, then one of your addons is the origin of the conflict.
    You'd have to disbale each in turn to find what the problem is.
    Maybe the addon should update.
    Report on the results.

  • Right click on the search bar, if there is already text inside, will bring up search suggestions in the context menu.

    Right click on the search bar, if there is already text inside, will bring up search suggestions in the context menu.

    This occurs when the search box had NOT been developed. Sometimes if there is search visible replacement engines.

    I find cela bug/annoyance.

    Hello m4lvolio, thank you for reporting this issue.
    However, it is a mainly managed by the community support forum, probably isn't the right place to report bugs (we are unable to implement all the features & devs read here).
    If you think this is a bug in the browser (and I can reproduce the issue certainly), please fill in a bug at bugzilla.mozilla.org.

  • What happened to the "mark this page" link in the context menu?

    I used more anywhere with the right button on a Web page and the option to choose any bkmrk folder, or create a new subfolder. There was no message stating "bookmark page." I would choose where I wanted to drop the bkmrk and the bkmrk would be there. Simple concept. has worked well. Effective summer bcs you never had to shift in another part of the screen, or at least not periphery. Right click-> 'bookmark this page' menu appears as if it were a context menu. I just downloaded and installed FF 32.0.2. The
    function right click that I talk about the disappeared with the upgrade just before this one.

    It's the Blue Star in the grouping of 4 images at the top of the context menu.

  • Firefox always displays all the possible options in the context menu

    When I select some text on a web site and right-click, I get a popup menu with about 50 options.

    Some earlier, archived posts have addressed one of the causes of this - extensions - but disable my extensions and restarting did not work for me. I always get the context menu options-50.

    Here are the previous posts:
    https://support.Mozilla.org/en-us/questions/955270
    https://support.Mozilla.org/en-us/questions/951383

    Do a clean reinstall and remove the Firefox program before (re) install a new copy of the current version of Firefox.

    Download a new copy of Firefox and save the file to the desktop.

    If possible to uninstall your current version of Firefox to clean the Windows registry and settings in the security software.

    • Do NOT remove the "personal data" when you uninstall your current version of Firefox, because this will remove all profile folders and you lose personal data such as bookmarks and passwords including data profiles created by other versions of Firefox.

    Remove the Firefox program before installation newly downloaded copy of the Firefox installer.

    • (32-bit Windows) "C:\Program Files\Mozilla Firefox\"
    • (Windows 64 bit) "C:\Program Files (x 86) \Mozilla.

    Your bookmarks and other personal data are stored in the Firefox profile folder and will not be affected by a uninstall and (re) install, but make sure that 'delete personal data' is NOT selected when you uninstall Firefox.

    If you keep problems also create a new profile.

  • Unable to save image in FF27 - win7 using the option of the context menu. Does nothing.

    When you try to save an image from a web page using FF27, I am not able to get this working using the option in the context menu. It is a very recent change. Problem occurs on a computer desktop and laptop running Windows 7.

    I searched using Google with no help is found. Is there a way to save the image if I use the Picture Info option in the context menu if something goes wrong.

    ROSC

    It must have been some changes in FF27 or 27.01 the addon of problem being that I have used for a time very long. Addon is PhotoMe which is a program and there is an option to install as an add-on.

    Disappointedly, I removed it from both PC and Firefox will now save the Image using the context menu.

    Thanks again for your help.

    ROSC

  • Using the context menu in Firefox causes my CPU to run constantly at > = 50%, until the program is closed.

    I discovered that even open the context menu, without even a selection causes this to happen. I've uninstalled and reinstalled the software. Here is my system info:

    Name of the operating system Microsoft Windows 7 Home Premium
    Version 6.1.7601 Service Pack 1 Build 7601
    Another Description of the OS is not available
    Manufacturer of operating system Microsoft Corporation
    System name RAY - PC
    System manufacturer Hewlett-Packard
    HP HDX 18 Notebook PC model system
    System Type x 64-based PC
    Processor Intel (r) Core (TM) 2 Duo processor T9400 2.53 GHz, 2534 MHz, 2 Lossnay, 2 logical processors
    BIOS Version/Date Hewlett-Packard F.04, 01/10/2008
    SMBIOS Version 2.4
    Windows directory C:\Windows
    System directory C:\Windows\system32
    Boot Device \Device\HarddiskVolume1
    The local United States
    Hardware Abstraction Layer Version = "6.1.7601.17514".
    User name Ray-PC\Ray
    Time Zone MST
    Physical memory (RAM) installed 4.00 GB
    Total physical memory 4.00 GB
    2.42 GB available physical memory
    11.8 GB total virtual memory
    10.1 GB available virtual memory
    7.81 GB page file space

    Help!

    Hello

    Try Firefox Safe mode to see if the problem goes away. Safe mode is a troubleshooting mode, which disables most of the modules.

    (If you use it, switch to the default theme).

    • You can open Firefox 4.0 + in Safe Mode holding the key SHIFT key when you open the desktop Firefox or shortcut in the start menu.
    • Or open the Help menu and click on the restart with the disabled... modules menu item while Firefox is running.

    Once you get the pop-up, simply select "" boot mode safe. "

    If the issue is not present in Firefox Safe Mode, your problem is probably caused by an extension, and you need to understand that one. To do this, please follow article Troubleshooting extensions, themes and problems of hardware acceleration to resolve common Firefox problems .

    To exit safe mode of Firefox, simply close Firefox and wait a few seconds before you open Firefox for normal use again.

    When find you what is causing your problems, please let us know. It might help others who have the same problem.

    Thank you.

Maybe you are looking for

  • Days of mail to sync has gone!

    I have an iPhone 6 running the latest iOS 9.3.1. Last night, I deleted my Hotmail e-mail account, and then I added to remove a "phantom" mail unread Now my "Mail days to sync" option disappeared altogether in the world and I'm stuck with tons and ton

  • Is it useful to upgrade the ES1-431-C78A to 4 GB RAM?

    Specifications: Win 10 HSL 64-bit Intel Celeron N3050 2 GB of memory DDR3L 500 GB HARD DRIVE. Is it worth to upgrade the ram for smoother and better performance? Thank you.

  • Why can't I find the recovery from system to system tools

    went I went on the system tools there is not option for recovering the system how do that

  • Driver for printer deskjet f2180 OSX 10.7.5.

    Is it possible to get a driver for my printer deskjet f2180 will work with OSX 10.7.5. The installation cd does not work and cannot find anything online. I hope that it is possible, otherwise I'll have to buy a new...

  • BlueScreen - DRIVER_IRQL_NOT_LESS_OR_EQUAL

    Hello Since yesterday my laptop still shows blue screen once I turn it on - it does not commute even under Windows (7). Day before I installed Kaspersky Internet Security on my PC. In safe mode, I uninstalled. However, the problem persists. Here is t