Search
TemplatedItem Class
Remarks See Also
 






Represents an item which can be templated.

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

 Syntax

JavaScript  Copy Code

// class
TemplatedItem.prototype = {}

 Remarks

This is the base class for items that can have a template. Among them are TabPage, ToolStripItem and TreeNode.

 Example

The following code creates a new TabPage and sets its template:

JavaScript  Copy Code

var tab = new ui.TabPage("«");
tab.header.size = new ui.Unit(20);
tab.header.interactive = false;
tab.header.tooltip = "Previous Tab";
tab.data = -1;
tab.navigateUrl = "products.html";

var t = document.createElement("div");
var img = document.createElement("img");
img.width = img.height = "40";
img.src = "icon_fish.png";
img.style.verticalAlign = "middle";
t.appendChild(img);
var span = document.createElement("span");
span.innerText = "This user is not currently online";
t.appendChild(span);
tab.template = t.outerHTML;

 Inheritance Hierarchy

MindFusion.Common.UI.TemplatedItem
    MindFusion.Common.UI.ListItem

 See Also