Updated Container docs

updated docs for container (child instead of object)
This commit is contained in:
Robert Jelic
2023-05-18 13:02:04 +02:00
parent a8d08c865e
commit 47a4706a14
8 changed files with 40 additions and 17 deletions

View File

@@ -0,0 +1,22 @@
## removeChildren
### Description
The `removeChildren` method allows you to remove all child objects from a parent container. This is helpful when you want to clear all elements within a container object, such as a frame, and start with a clean slate.
### Returns
1. `object` The object in use
### Usage
```lua
local mainFrame = basalt.createFrame()
-- Add some child objects to the frame
mainFrame:addLabel("label1", "Hello", 5, 5)
mainFrame:addButton("button1", "Click Me", 5, 10)
-- Remove all child objects from the frame
mainFrame:removeChildren()
```