- Code: Select all
...
PresetList = ItemList(dialog2)
PresetList:SetFont(UIUtil.bodyFont, 14)
PresetList:ShowMouseoverItem(true)
PresetList.Width:Set(210)
PresetList.Height:Set(310)
LayoutHelpers.AtLeftIn(PresetList, dialog2, 10)
LayoutHelpers.AtTopIn(PresetList, dialog2, 38)
UIUtil.CreateVertScrollbarFor2(PresetList)
--
LOAD_PresetProfils_For_InfoList()
PresetList.OnClick = function(self)
LOG('ONE CLICK > '..PresetList:GetSelection())
AddChatText('ONE CLICK > '..PresetList:GetSelection())
end
...
PresetList:GetSelection() return ALWAYS '-1' index, this is my problem.
- Code: Select all
function LOAD_PresetProfils_For_InfoList()
PresetList:AddItem('item1')
PresetList:AddItem('item2')
PresetList:AddItem('item3')
PresetList:AddItem('item4')
end