Search
TemplatedItem.template Property
See Also
 






Gets or sets an HTML string, representing the template.

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

 Syntax

JavaScript  Copy Code

get template() {}

 Property Value

String. An HTML string representing the item template.

 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;

 See Also