// 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); |