Release 10.1A: OpenEdge Development:
Progress Dynamics Basic Development

> ## Creating bands

> This section describes how to put together the items you created in the previous section to form bands.

> You will create the following three bands:

> - An Edit band, where you can group the Cut/Copy/Paste items.

> - A Module band, where you can merge in other appropriate bands for a specific container window.

> - A top-level MenuBar band, where the other new bands and a couple of standard Progress Dynamics bands, such as those you have looked at, will be grouped together.

> | To create the Edit, Module, and MenuBar bands:

> 1. Expand the Bands node in the TreeView.

> 2. Right-click on the Menu&Toolbar node, then select Add Band from the pop-up menu.

> 3. Enter a Band Code of tEditBand, a Description of Edit Band, and an appropriate Detailed Description, such as This band is used to contain the cut/copy/paste items. Because you added this band under the `Menu&Toolbar` node, the Band Type is properly set to that value.

> 4. Choose Save to complete this band definition.

> 5. Choose Add in the Band Maintenance tab to add a second new band.

> 6. Enter a Band Code of tModuleBand, a Description of the `Module` band, and a Detailed Description of This band is to be merged for the customer maintenance window. This is to be a SubMenu band.

> 7. Because you just chose Add rather than first selecting the SubMenu node in the TreeView, change the Band Type to SubMenu.

> Because this is a SubMenu band, it needs a Label, which when selected brings up the submenu. The Label must be an existing item of that type.

> 8. Enter tModule as the Item Reference used for Label.

> 9. Choose Save to complete this band.

> 10. Choose Add once more to create a third new band. This band will represent the top-level menu for your toolbar. Under it you will place the Edit band, the Search Item that you created earlier as a Label for the built-in Navigation band, a standard File menu band, a standard Help menu band, and a DynamicMenu placeholder where the `Module` band will go.

> 11. Enter a Band Code of tStandard, a Band Description of Standard MenuBar, a Band Type of Menubar, and the Detailed Description of This is the standard top-level menu bar for maintenance toolbars.

> 12. Choose Save to save this final new band.

> Since there are a lot of elements to a complex toolbar and you must create and organize objects at several different levels, it is important to design your toolbars and their contents before you start creating them. In particular, explore the items, bands, and toolbars that come with the framework to save yourself the trouble of creating something similar from scratch. And organize your own new objects in such a way as to permit maximum reuse. This way you will not only save yourself development and maintenance chores, but also provide a more consistent interface for your application.

> ##### Associating items with bands and subbands with other bands

> The association process involves associating items with bands and subbands.

> | To associate Items with bands and subbands with other bands:

> 1. Select the Edit band node that you created in the previous steps. This node is under the Menu&Toolbar node. Note that it is the Band Description, not the Band Code, that you see in the TreeView.

> 2. Right-click on the Edit Band, then select Add Item to Band from the pop-up menu.

> 3. Add the following three band items by specifying only the Item Reference and the Item Sequence:

> - Copy — 1
> - Cut — 2
> - Paste — 3
> 4. Save each of these in turn to associate them with the Edit band.

> 5. Select the Module band from under the SubMenu node in the TreeView.

> 6. Right-click on the node, then select Add Item to Band.

> 7. Add a single item to the band: the tAdmin Item with a sequence of 1. This places the menu item that brings up the Administration window under the Modules menu item.

> 8. Save this band item.

> 9. Select the Standard Band from under the MenuBar node, and right-click on it.

> 10. Add these five Items to the Standard band:

> - File, with an Item Sequence of 1 and a Submenu/SubBand of FileTableIOMod.
> - Edit, with an Item Sequence of 2 and a Submenu/SubBand of tEditBand.
> - Search, with an Item Sequence of 3 and a Submenu/SubBand of Navigation.
> - DynamicMenu, with an Item Sequence of 4 and no Submenu/SubBand.
> - Help, with an Item Sequence of 5 and a Submenu/SubBand of Help.

> Now you have created all the bands for your application toolbar. As a final step in working with bands, you will associate the `Module` band with a particular application window. (In the next section of this chapter, you will create a toolbar object for this application window.). This example uses the `Customer` maintenance window that you might have already created as part of OpenEdge Development: Progress Dynamics Getting Started , called `custfoldwin`. If you do not have this container window, you can associate the `Module` band and later the new Tutorial toolbar with any other maintenance window you create.

> | To create a maintenance window:

> 1. Select the Module band, then select the Band objects tab in the folder.

> 2. Choose the Add button in the Update panel in the Band objects tab.

> 3. Enter an Object Filename of custfoldwin and a Band Sequence of 1. Leave the Insert Submenu toggle box checked (`TRUE`).

> 4. Choose Save.

Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095