This sample demonstrates the new dmbAPI_addTBItem function which allows the creation of toolbar items.

On the left side of the screen you will see a toolbar with several menu items, all of them created with the DynAPI.
On the right side, you will see another toolbar which contains four toolbar items. The fifth one is created with the DynAPI. Also notice that this additional toolbar item displays a group created also with the DynAPI.

Here's the code used to create this sample.

    // This variable is used to hold the reference to newly created menu items
    var tbi;

    // First of all we need to initialize the DynAPI
    dmbAPI_Init();

    // Now let's create three toolbar items under the first toolbar
    //   and assign a URL to each one of them
    tbi = dmbAPI_addTBItem(1, "xFX JumpStart");
    dmbAPI_setOnClick(tbi, "http://xfx.net");
    tbi = dmbAPI_addTBItem(1, "DHTML Menu Builder");
    dmbAPI_setOnClick(tbi, "http://www.dhtmlmenubuilder.com");
    tbi = dmbAPI_addTBItem(1, "DE Documentation");
    dmbAPI_setOnClick(tbi, "http://software.xfx.net/utilities/dmbuilder/de/help/readme.htm");

    // Let's create a new toolbar item under the second toolbar
    tbi = dmbAPI_addTBItem(2, "« New Group");

    // Let's set a new color
    dmbAPI_setColor(tbi, "#FFFFFF", "#C02020", "#FFFFFF", "#FF6600");

    // Now we're going to create a group which will be displayed when
    //    the toolbar item that we created on the last step is selected
    dmbAPI_addGroup("MyNewGroup");

    // And let's add a couple of commands to the new group...
    dmbAPI_addCommand("MyNewGroup", "Command 001");
    dmbAPI_addCommand("MyNewGroup", "Command 002");
    dmbAPI_addCommand("MyNewGroup", "Command 003");
    dmbAPI_addCommand("MyNewGroup", "Command 004");

    // Finally, we configure the OnMouseOver event for the toolbar item so when
    //    selected it displays the group we just created.
    dmbAPI_setOnMouseOver(tbi, "MyNewGroup", '', true, 4);