natiny.view.set_parent

Lua
natiny.view.set_parent(child, parent)

Appends a view to the children of another, or detaches it.

Parameters

Name Type Description
child number View to move
parent number New parent, or nil or 0 to detach

Example

Lua
natiny.view.set_parent(button, toolbar)

-- bring a window to the front of its siblings
natiny.view.set_parent(window, desktop)