This commit is contained in:
Hao Ren 2020-06-11 03:13:53 +00:00 committed by GitHub
commit 23dd8cee28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 3 deletions

8
box.go
View File

@ -83,3 +83,11 @@ func (b *Box) Padded() bool {
func (b *Box) SetPadded(padded bool) { func (b *Box) SetPadded(padded bool) {
C.uiBoxSetPadded(b.b, frombool(padded)) C.uiBoxSetPadded(b.b, frombool(padded))
} }
// Clear clears the children of the Box.
func (b *Box) Clear() {
n := len(b.children)
for index := 0; index < n; index++ {
b.Delete(0)
}
}