Search
ListContainer.selectItem Method
See Also
 






Selects a ListItem.

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

 Syntax

JavaScript  Copy Code

function selectItem (item)

 Parameters

item

ListItem. The item to select.

 Example

The following sample creates a new ToolStripItem and adds it to the collection of items of a ToolStrip instance, which derives from ListContainer. Then it selects this item.

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);

toolstrip.selectItem(button);

 See Also