natiny.view.get_parent

Lua
natiny.view.get_parent(view) -> parent

Returns the view this one is a child of.

Parameters

Name Type Description
view number View handle

Returns

Type Description
number Parent view handle, or 0 for a view with no parent

Example

Lua
if natiny.view.get_parent(panel) == 0 then
    natiny.view.set_parent(panel, root)
end