Radiobutton:onDrop(kind, content)event
This event is fired when the user has dropped the mouse over the Radiobutton.
Parameters
kind
A string representing the kind of content dropped on the Radiobutton.
content
The content dropped on the Radiobutton, the type of which depends on the following table:
| kind | content |
|---|---|
"text" | string |
"files" | table(list of File and Directory) |
"unkown" | nil |
Return value
The event returns no value.Example
--! luart-extensions
import ui
-- create a window
local win = ui.Window("Radiobutton:onDrop() sample", 640, 480)
local widget = ui.Radiobutton(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 Radiobutton")
end
await win:showasync()