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

Native Development

Posts: 22
Registered: ‎01-24-2011
My Device: Not Specified

Learning QML - ActionBar and ContextMenu frustrations

I am trying to make a simple userinterface with a textual list and a context-menu similar to what was shown in session DEV105 at BB10 JAM with the Pictures App (see attached images). But I am not able to get the desired behaviour.




1. The Context menu is opened before list-selection is moved. The list-selection/highlight is moved on touch-up, but the context menu opens before touch-up already on long-press. This is so confusing so I decided to abandon context menu unless this can be fixed. With ContextMenu I refer to using "contextActions: ActionSet {}" on a Control inside a ListItemComponent. For determining which item that is selected I use ListItem.selected.


2. A guideline I have heard is to place the delete-actionItem at the bottom of the context/overflow menu as is done in the Pictures App, but I find no way of controlling ActionItem layout other than inserting empty action items. 


3. When attempting to use the Actionbar instead, to avoid the confusion with the contextmenu not operating on the listitem you pressed upon, I wanted to have a single ActionItem in the Actionbar and the rest of the stuff in the overflow menu. But I can't find any way to put items in the overflow menu other than having 4 or more actionitems in the bar. But the slides in DEV105 shows an actionbar with just backbutton and another single actionitem and the overflow menu, so it should be possible. How?


My questions to the Cascades QML gurus are:

1. How to get list-selection to change on touch-down and drag events?

2. How to layout the delete-item at the bottom of the overflow/context menu

3. How do I get action-items into the overflow menu without first filling up the action bar?


Thanks for your kind help!



Posts: 22
Registered: ‎01-24-2011
My Device: Not Specified

Re: Learning QML - ActionBar and ContextMenu frustrations

I rephrase my questions


How can we implement these things described in the documentation?

  1. Context and overflow menu with the delete item layed out at the bottom. See Cascades UI Guideline: http://docs.blackberry.com/en/developers/deliverables/41577/menus.jsp
  2. Action bar showing less than 4 actions even though more exists in overflow menu. See Cascades UI Guideline: http://docs.blackberry.com/en/developers/deliverables/41577/action_bars.jsp
  3. How do we control the highlight behaviour to trigger on touch down instead of touchup. See Cascades UI Guideline: http://docs.blackberry.com/en/developers/deliverables/41577/highlight_behavior.jsp