Search
ListContainer.itemClick Event
See Also
 






Raised when an item is clicked.

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

 Syntax

JavaScript  Copy Code

EventDispatcher itemClick

 Event Data

The event handler method receives the following arguments:
sender
A ListContainer instance, which is the source of the event. This object will be passed to the handler function as the first argument.
args
An ItemEventArgs instance, which contains event data. This object will be passed to the handler function as the second argument.

 Example

The following code handles the itemClick event of a ToolStrip object. The ToolStrip class derives from ListContainer.

JavaScript  Copy Code

toolstrip.itemClick.addEventListener(handleToolbuttonClick);

function handleToolbuttonClick(sender, args)
{
 if (args.item.data == "1")
  toolstrip.theme = tabControl.theme = args.item.title;
 else if (args.item.title == "New Tab")
  addEmptyPage();
 else if (args.item.title == "Remove Tab")
 {
  if (tabControl.items.count() > 3)
   tabControl.tabs.remove(tabControl.selectedItem);
 }
}

 See Also