Tab:remove(index | item) method
Remove an item from the Tab.
index | item
A number, representing the item index or the TabItem to be removed.Return value
This function returns no value.Example
local ui = require "ui"
-- create a simple Window
local win = ui.Window("Tab:remove() sample", "fixed", 410, 240)
local tab = ui.Tab(win, {"LuaRT", "is", "fun !"})
local removebtn = ui.Button(win, "Remove item", tab.x+tab.width+6, 36)
function removebtn:onClick()
-- removes current selected item
tab:remove(tab.selected)
end
win:show()
-- update user interface
repeat
ui.update()
until not win.visible