beautypg.com

Menuid="menu_id, Colorrect="left top right bottom, File="command_file_path – Adobe Extending Dreamweaver CS4 User Manual

Page 188: Domrequired="true" or "false, Enabled="script

background image

182

EXTENDING DREAMWEAVER CS4

Toolbars

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 functions

” on page 185.

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"

enabled="script"

Optional. As with menus, the script returns a value that specifies whether the item is enabled. If you do not specify this
attribute, it defaults to enabled. The

enabled

attribute is equivalent to the

canAcceptCommand()

function in a toolbar

command file.

Example

enabled="dw.getFocus() =='textView' || dw.getFocus() == 'html'"

This manual is related to the following products: