DHTML Menu Builder [DynAPI 1.1]
<developers_edition>
Saturday April 12, 2008

 

 

WARNING: The information on this documentation will change as the development on this version of DHTML Menu Builder progresses.
It is VERY important that you always refer to the information provided in this document prior to testing new versions of the DynAPI code.


Adding/Removing Items Functions

objid dmbAPI_addCommand(Group, Caption, DisableAutoSize)


Description

Creates a new command and returns the id of the newly created command.

Code sample
dmbAPI_addCommand("grp001", "New Item");
This sample demonstrates how to add a command to a group.
A new command with "New Item" as a caption will be added to a group whose name is "grp001".

Parameters

Group (string)The group receiving the new command is defined by the Group parameter.

Caption (string)The Caption for the new command is set on the second parameter.

DisableAutoSize (boolean)By default, when adding a new command to a group, the DynAPI will re-scan all the commands in the group, determine their sizes and adjust the group's width accordingly.

Adding many commands to a group can be a quite slow process due to the automatic process of recalculating the new group's width.

This parameter can let you control when the function should recalculate the group's width so you want to pass a "true" value to this function (to disable the width recalculation) and then pass a "false" value at the last function call.

You can see this feature in action in the updated "Server Side" sample.