TreeItem.count readonly property
Get the count of the TreeItem subitems.
Example
local ui = require "ui"
-- create a simple Window
local win = ui.Window("TreeItem.parent sample", "fixed", 320, 250)
local tree = ui.Tree(win, {["Tab 1"] = {"SubItem1", "SubItem2"}, "Tab 2", "Tab 3"})
function tree:onSelect(item)
win:status(item.text.." parent is "..(item.parent.text or "none"))
end
win:show()
-- update user interface
repeat
ui.update()
until not win.visible