Docs 1.6
Accidentally uploaded outdated 1.6 docs
This commit is contained in:
27
docs/docs1_6/objects/Object/setParent.md
Normal file
27
docs/docs1_6/objects/Object/setParent.md
Normal file
@@ -0,0 +1,27 @@
|
||||
# Object
|
||||
|
||||
## setParent
|
||||
|
||||
Sets the parent frame of the object
|
||||
|
||||
### Parameters
|
||||
|
||||
1. `frame` The to-be parent frame
|
||||
|
||||
### Returns
|
||||
|
||||
1. `object` The object in use
|
||||
|
||||
### Usage
|
||||
|
||||
* Sets the parent frame of the random frame, adding it to the main frame when the button is clicked"
|
||||
|
||||
```lua
|
||||
local mainFrame = basalt.createFrame()
|
||||
local aRandomFrame = basalt.createFrame()
|
||||
local aButton = mainFrame:addButton():onClick(
|
||||
function()
|
||||
aRandomFrame:setParent(mainFrame)
|
||||
end
|
||||
)
|
||||
```
|
||||
Reference in New Issue
Block a user