Материал из Module developer
Перейти к: навигация, поиск

ListItem.SetReleaseAction

Add an action to a list item

Синтаксис

List.SetReleaseAction(Action, [Space])

Название Пример Описание
Action function(in_listItem, in_object){...} type: Function
the function is performed when a list item is pressed
  • in_listItem - an object of list item
  • in_object - an object of popup item
Space type: Object
pointer to an object that services a function
На выходе

-


Пример

var l_oList = module.GetPopup("Popup 1").GetItem("list"); //getting the list object
var l_oItem_1 = l_oList.GetItemByIndex(1); // getting the list item
l_oItem_1.SetReleaseAction(function(in_listItem, in_object){
IR.Log("Hello, world!");
});