Search
Container.fit Method
See Also
 






Ensures that a child window fits into content bounds.

Namespace: MindFusion.Common.UI
File: Container.js

 Syntax

JavaScript  Copy Code

function fit (window)

 Parameters

window

WindowBase. The child window to check.

 Example

The following code creates a new WindowHost and then makes sure the first Window fits the available space. WindowHost derives from Container:

JavaScript  Copy Code

// create a new instance of the WindowHost control
host = new ui.WindowHost(document.getElementById("host"));
host.width = host.height = new ui.Unit(100, ui.UnitType.Percent);
host.theme = theme;
host.render();

.......
.......

var window = host.windows[0];

if(window != null)
 host.fit(window);

 See Also