Working with Action Menus
Overview
Action menus are the menus that appear in the top right corner of the header bar in a touch/mobile application. These menu items may appear as a button in a menu bar and/or they may appear in a drop-down menu that is accessed by pressing the “more options” icon. The actual menu bar control is created in your cWebApp object using the cWebActionBar class. This object does not contain menu items. Each view defines items for this menu by defining a cWebMenuGroup within the view object. This object will contain menu items. When the view is displayed, the menu items for this view are displayed by the cWebActionBar control. This allows all views to share the same action bar menu but show custom menu items for each view.
Menu Item Configuration
Each menu item within a cWebMenuGroup is a standard cWebMenuItem. When a cWebMenuItem is used within an action group, the peActionDisplay property determines where the menu item will appear:
- If set to
adMenu, it will only appear in the drop-down menu. - If set to
adActionBar, it will only appear in the action bar. - If set to
adBoth, it will appear in both the action bar and the menu (this is the default).
The width of the action bar menu is determined by the piWidth web property. When the desired menu items do not all fit in the action bar, the extra items will be added to the drop-down menu.
Display Options
Normally, action bar items are displayed as an icon. This can be changed with the cWebActionBar properties:
pbShowCaptionpbShowIcons
It is expected that the menu items appearing in an action bar view will change based on how the view is being used. You can hide or disable menu items using the pbRender and pbEnabled web properties. With mobile applications, it makes the most sense to hide the menu items you do not need. When navigating forward in a view, you will probably want to hide/show the menu items needed for this particular usage of the view.
Navigation
- Previous Topic: The Back Navigation Process
- Next Topic: Multi-Line Row Support in Lists and Grids