beautypg.com

Isresizable(), Selectionchanged() – Adobe Extending Dreamweaver CS4 User Manual

Page 237

background image

231

EXTENDING DREAMWEAVER CS4

Floating panels

isResizable()

Availability
Dreamweaver 4.

Description
Determines whether a user can resize a floating panel. If the function is not defined or returns a

true

value, the user

can resize the floating panel. If the function returns a

false

value, the user cannot resize the floating panel.

Arguments
None.

Returns
Dreamweaver expects a Boolean value:

true

if the user can resize the floating panel;

false

otherwise.

Example
The following example prevents the user from resizing the floating panel:

function isResizable()

{

return false;

}

selectionChanged()

Description
Called when the floating panel becomes visible and when the selection changes (when focus switches to a new
document or when the insertion point moves to a new location in the current document). This function should be
defined only if the floating panel must track the selection.

Note: Define

selectionChanged()

only if you absolutely require it because its existence impacts performance.

Arguments
None.

Returns
Dreamweaver expects nothing.

Example
The following example of

selectionChanged()

shows a different AP element in the floating panel, depending on

whether the selection is a script marker. If the selection is a script marker, Dreamweaver makes the

scriptlayer

AP

element visible. Otherwise, Dreamweaver makes the

blanklayer

AP element visible.

This manual is related to the following products: