Files
Basalt/docs/objects/Container/removeChildren.md
Robert Jelic 47a4706a14 Updated Container docs
updated docs for container (child instead of object)
2023-05-18 13:02:04 +02:00

23 lines
565 B
Markdown

## 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()
```