User Guide

184 Chapter 9: Toolbars
width="number"
Optional. This attribute applies only to text box, pop-up menu, and combo box items by
specifying the width of the item in pixels. If you do not specify the
width attribute, Dreamweaver
uses a reasonable default width.
Example
width="150"
menuID="menu_id"
This attribute is required for menu buttons and combo buttons, unless you specify the
getMenuID() function in an associated command file. Dreamweaver ignores the menuID attribute
for other types of items. This attribute specifies the ID of the menu bar that contains the context
menu to pop up when the user clicks the button, menu button, or combo button. The ID comes
from the ID attribute of a
menubar tag in the menus.xml file.
Example
menuID="DWCodeNavPopup"
colorRect="left top right bottom"
This attribute is optional for color pickers that have an image attribute. The
colorRect attribute
is ignored for other types of items and for color pickers that do not specify an image. If you
specify the
colorRect attribute, Dreamweaver displays the color that is currently selected in the
color picker in the rectangle, relative to the left or top of the icon. If you do not specify the
colorRect attribute, Dreamweaver does not display the current color on the image.
Example
colorRect=”0 12 16 16”
file="command_file_path"
Required for pop-up menus and combo boxes. The
file attribute is optional for other types of
items. The
file attribute specifies the path, relative to the Configuration folder, of a command
file that contains JavaScript functions to populate, update, and execute the item. The
file
attribute overrides the
enabled, checked, value, update, domRequired, menuID, showIf, and
command attributes. In general, if you specify a command file with the file attribute,
Dreamweaver ignores all the equivalent attributes that are specified in the tag. For more
information about command files, see “The toolbar command API” on page 187.
Example
file="Toolbars/MM/EditTitle.htm"
domRequired="true" or "false"
Optional. As with menus, the
domRequired attribute specifies whether the Design view should be
synchronized with the Code view before Dreamweaver runs the associated command. If you do
not specify this attribute, it defaults to a
true value. This attribute is equivalent to the
isDOMRequired() function in a toolbar command file.
Example
domRequired="false"