Tree:onHide() event
This event is fired when the Tree is hidden (with a call to Tree:hide() or setting the Tree.visible property to false).
Return value
The event returns no value.Example
local ui = require "ui"
-- create a window
local win = ui.Window("Tree:onHide() sample", 320, 240)
local button = ui.Button(win, "Click me !", 130, 10)
local tree = ui.Tree(win, {'Item 1', 'Item 2', 'Item 3'}, 100, 40)
win:status("Click the button to throw the Tree:onHide() event")
-- set a onClick() event : hides the Tree
function button:onClick(x, y)
tree:hide()
end
-- set a onHide() event : Shows a message
function tree:onHide()
win:status("Tree is now hidden")
end
win:show()
while win.visible do
ui.update()
end