Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Contributor
Posts: 11
Registered: ‎03-17-2011
My Device: Storm 1
My Carrier: Verizon

How do I stop the context menu from appearing when I click

Hi,

 

I'm developing an app which has multiple clikable custom bitmap fields.  When I click on a custom bitmap, it changes.  That works fine.  The custom bitmap fields are arranged using a custom Manager that puts them in a grid structure.

 

However, whenever I click, the context menu appears.  How do I stop that from happening.  I still want the menu button to work.  However, I don't want the context menu to work.

 

I want the context menu to be turned off, disabled, whatever it takes for it not to appear while allowing the menu button to still work.

 

Developer
Posts: 16,676
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: How do I stop the context menu from appearing when I click

the context menu is the standard action for a navigation click. overwrite navigationclick to return true to consume the event.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
Posts: 404
Registered: ‎05-31-2011
My Device: curve
My Carrier: devel

Re: How do I stop the context menu from appearing when I click

you must override the navigationclick and add ButtonField.CONSUME_CLICK as style when you add your bitmapfield