Class: cWebActionBar

Properties  Events  Methods    Index of Classes

The cWebActionBar class is designed as a container for action buttons (cWebMenuItem)



Library: Web Application Class Library

Package: cWebActionBar.pkg


The action bar (cWebActionBar) will display a fixed number of menu items (cWebMenuItem) as action buttons that are always visible (peActionDisplay determines whether the items should be shown on the action bar, the menu or both). Then, if the action bar contains more items, an "expand" button is displayed (this is usually represented by 3 vertically stacked dots - as shown above). When the "expand" button is clicked, the remaining items are displayed in a drop down menu list.

An action bar is a compact replacement for cWebToolBar in a mobile/touch web application.

Menu items that are declared as child objects of the action bar will always be displayed in the action bar. If you want more than the default number of menu items displayed on the action bar, you may have to increase the width of the cWebActionBar object.

Static vs. Dynamic Items

Dynamic menu items can be declared inside view objects, using a menu group (cWebMenuGroup), such that when the view is visible its menu group will provide its menu items to the action bar. When the view is no longer visible, its menu items are removed.

The menu group's psGroupName property must match the action bar's psGroupName property in order for it to be a menu provider to that action bar.


The sample below shows an action bar with a group name of "MyActions". When a view is displayed that contains a menu group (cWebMenuGroup) with a matching group name then its menu items are appended the action bar. The first two menu items will be displayed as action buttons and the remainder are added to the action bar's dropdown list.

Object oMainActions is a cWebActionBar
    Set psGroupName to "MyActions"
    Set piColumnSpan to 0
    Set peAlign to alignRight

Drag and Drop Support

This control can be used as a valid drop target by registering it as such in a cWebDragDropHelper object.

The supported actions for this control are:
- C_WebDropOnControl

This allows the control to accept data dragged from elsewhere in the control (if configured that way) and can also be used to accept files when registered within a cWebDragDropFileHelper.