Draws the control.
Namespace: MindFusion.Common
File: Control.js
Syntax
JavaScript
Copy Code
|
---|
function draw () |
Return Value
HTMLElement. The control DOM element.
Example
The following code creates a new ListView control and calls its draw method to render it on the web page.
JavaScript
Copy Code
|
---|
// Create a new ListView control. // This list view will serve as a drag source. var list1 = new ui.ListView(); list1.theme = "business"; // Load the items data list1.fromObject(data); // Add event handlers list1.itemDragStart.addEventListener(listDragStart); list1.itemDragEnd.addEventListener(listDragEnd); // Draw the control and append it to the page DOM. document.body.appendChild(list1.draw()); // Prepare the control for user interaction. list1.attach(); |
See Also