ComboItem:remove()method
Removes the ComboItem from the Combobox it belongs to.
Return value
This method returns no value.Example
--! luart-extensions
import ui
-- create a simple Window
local win = ui.Window("TabItem:remove() sample", 316, 246)
local cb = ui.Combobox(win, {"autoexec.bat", "config.sys"}, 10, 10)
function win.CtrlW()
if cb.count > 0 then
cb.selected:remove()
end
end
win:shortcut("w", win.CtrlW, true)
win:status("Press CTRL+W to remove a TabItem")
-- shows the Window
win:show()
-- update user interface
repeat
ui.update()
until not win.visible