Collapsible Menus Sample 6

This sample uses the a new feature that allows you to define which toolbars in the project should be converted into CollapsibleMenus.
Previous versions of the AddIn only allowed one toolbar to be converted; in this version you can convert any number of toolbars into CollapsibleMenus.

To define which toolbars you want to convert you must add a small piece of javascript code to the <HEAD> section of your HTML documents.
For example, to instruct the AddIn to convert the first and second toolbars you should add the following code:

<script language="javascript">CMTBIndex = [1, 2];</script>

As you can see, all we're doing is declaring a variable called "CMTBIndex" using an array of numbers. These numbers indicate the IDs of the toolbars that you want to convert into collapsible menus. If, for example, you have a project with 5 toolbars and you would like to convert the second, and fifth toolbar then you would have to use the following code:

<script language="javascript">CMTBIndex = [2, 5];</script>

If you have more toolbars then simply add their IDs and separate them with commands. The following example demonstrates the code that would be required to convert the first, third and seventh toolbar:

<script language="javascript">CMTBIndex = [1, 3, 7];</script>

Remember to include this code in the <HEAD> section of your HTML documents as this will ensure that the variable is initialized before the menus are loaded and that the "Tools->Install Menus" tool doesn't remove it or change it.

Note to users of the dmbCMexp image technique (see sample 4)

Note that the toolbars on this project sample are positioned using the "Free Flow" technique; this allows us to place the toolbar anywhere on the page and have the contents of the page re-flow as the toolbars expand and collapse.
In previous versions of the AddIn we had to use an image to control the menus position and to allow the contents of the page to re-flow as the menus' changed their size to the expanding/collapsing action of the menus.

Since the introduction of the Free Flow positioning technique this is no longer necessary and the support for the dmbCMexp image technique has been removed from the AddIn. If you were using this technique you will have to change it so your menus use the easier and more reliable Free Flow positioning technique.