Search
ToolStripItem Constructor
See Also
 






Initializes a new instance of the ToolStripItem class.

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

 Syntax

JavaScript  Copy Code

function ToolStripItem ([type, [title]])

 Parameters

type
Optional.

ToolStripItemType. The type of this item.

title
Optional.

String. The display text of this item.

 Example

The following sample creates a new ToolStripItem and adds it to the collection of items of a ToolStrip instance:

JavaScript  Copy Code

var ui = MindFusion.UI;

// create a new instance of the WindowHost control
var toolstrip = new ui.ToolStrip(document.getElementById("toolstrip");

var button = new ui.ToolStripItem(ui.ToolStripItemType.Label, "New Tab");
button.tooltip = "New Tab";
button.cssClass = "toolbutton-add";
toolstrip.items.add(button);

 See Also