Search
WindowHost.detach Method
See Also
 






Container.detach override.

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

 Syntax

JavaScript  Copy Code

function detach ()

 Example

The following code shows an event handler of the itemClick event of a ToolStrip. If a Window instance called "window" is loaded, we detach its event handlers and dispose it:

JavaScript  Copy Code
// This is the handler function of an ToolStrip itemClick event.
// If the window is currently visible it will be removed.
function closeButtonClicked(sender, args)
{
  if (window.loaded)
  { 
        window.detach();
        window.dispose();
   }
}

 See Also