Search
Control.controlLoad Event
See Also
 






Raised when the control is loaded.

Namespace: MindFusion.Common
File: Control.js

 Syntax

JavaScript  Copy Code

EventDispatcher controlLoad

 Event Data

The event handler method receives the following arguments:
sender
A Control instance, which is the source of the event. This object will be passed to the handler function as the first argument.
args
An EventArgs instance, which contains event data. This object will be passed to the handler function as the second argument.

 Example

The following code handles the controlLoad event for a Window instance.

JavaScript  Copy Code

// Handle the controlLoad event.
window1.controlLoad.addEventListener(handleWindowLoad);

// This is the handler function of the wndow1.controlLoad event.
// The sender argument is a reference to the Window.
function handleWindowLoad(sender) {
 // Hide the window header.
 sender.header.style.display = "none";

 // Let the window calculate its size, depending on the size of the its contents.
 sender.autoSize();

 // Center the window in the bounds of its parent element.
 sender.center();

 // Display the associated data.
 sender.element.querySelector("#data").value = sender.data;
 .........................................
 .........................................
}

 See Also