updatePane

Description

Update an existing pane in place. Change its layout (position, size, minWidth, minHeight) and/or the title and content of the pane's glasstitle and content are written into that glass's header and body. Only the fields you pass are changed; the rest are left untouched.

binaryWindow.updatePane(sashId, options);

Parameters

Function parameters

NameTypeDescription
sashIdstringSash ID of the pane to update.
optionsobjectFields to update. e.g., title, size, etc.

options details

NameTypeDescription
contentstring | DOM Node | ReactNode1New content of the pane's glass
titlestring | DOM Node | ReactNode1New title of the pane's glass
positionstringNew position of the pane. One of top, right, bottom, or left
sizenumber | stringNew size of the pane. e.g., 100, 0.5, "50%"
minWidthnumberMinimum width the pane can be resized to
minHeightnumberMinimum height the pane can be resized to

Returns

Type: void

Examples

// Change only the title
binaryWindow.updatePane('pane-1', { title: 'Renamed' });

// Resize and swap content
binaryWindow.updatePane('pane-1', { size: '60%', content: 'New content' });

In React, reach updatePane through the useWindow hook.

See also

Footnotes

  1. DOM Node is for vanilla Javascript, and ReactNode is for React. 2