beautypg.com

Chapter 15: floating panels, How floating panel files work – Adobe Extending Dreamweaver CS4 User Manual

Page 228

background image

222

Chapter 15: Floating panels

You can create floating panels or inspectors without the size and layout limitations of Property inspectors.

A custom Property inspector must be your first choice for setting the properties of the current selection. But, custom
floating panels offer more room and flexibility for displaying information about the entire document or multiple
selections.

You can create custom panels and add them to the Window menu. For more information on adding items to the menu
system, see

Menus and menu commands

” on page 141.

The following table lists the files you use to create a floating panel:

How floating panel files work

Custom floating panel files are HTML files that reside in the Configuration/Floaters folder inside the application
folder. The

body

section of a floating panel file contains an HTML form. Event handlers that are attached to form

elements can call JavaScript code that performs arbitrary edits to the current document.

Dreamweaver has several built-in floating panels that are accessible from the Window menu. (These built-in panels
are part of the core Dreamweaver code and do not have corresponding floating panel files for them in the
Configuration/Floaters folder.)

Custom floating panels can be moved, resized, and tabbed together the same way as the floating panels that are built
into Dreamweaver. Custom floating panels differ from built-in floating panels in the following ways:

Custom floating panels display in the default gray. Setting the

bgcolor

attribute in the

body

tag has no effect.

All custom floating panels either appear in front of the Document window or float behind it when inactive. Where
the floating panels appear depends on the setting for All Other Floaters in the Panels preferences.

Floating panel files also differ somewhat from other extensions. Unlike other extension files, Dreamweaver does not
load floating panel files into memory at startup unless the floating panels were visible when Dreamweaver last shut
down. If the floating panels are not visible when Dreamweaver shut down, reference from one of the following
functions to load the files that define the panels.

dreamweaver.getFloaterVisibility()

dreamweaver.setFloaterVisibility()

dreamweaver.toggleFloater()

For more information on these functions, see the Dreamweaver API Reference.

Path

File

Description

Configuration/Floaters/

panelname.htm

Specifies the text that appears in the title bar of the floating
panel, defines the floating panel, and contains the required
JavaScript functions.

Configuration/Menus/

menus.xml

Adds a command to a menu.

This manual is related to the following products: