Panel.allowdrop read/write property


Get or set the Panel's ability to be used as the target of a drag-and-drop operation

Example

local ui = require "ui" -- create a window local win = ui.Window("Panel:onDrop() sample", 440, 380) local widget = ui.Panel(win, "Drop it here !") widget.allowdrop = true widget:center() -- set a onDrop() event function widget:onDrop(kind, content) ui.info("kind: '"..kind.."'\ncontent: "..tostring(content), "Content dropped on Panel") end ui.run(win):wait()