Merge f1f4774914
into 70a69d6ae3
This commit is contained in:
commit
23dd8cee28
10
box.go
10
box.go
|
@ -67,7 +67,7 @@ func (b *Box) Append(child Control, stretchy bool) {
|
|||
|
||||
// Delete deletes the nth control of the Box.
|
||||
func (b *Box) Delete(n int) {
|
||||
b.children = append(b.children[:n], b.children[n + 1:]...)
|
||||
b.children = append(b.children[:n], b.children[n+1:]...)
|
||||
C.uiBoxDelete(b.b, C.int(n))
|
||||
}
|
||||
|
||||
|
@ -83,3 +83,11 @@ func (b *Box) Padded() bool {
|
|||
func (b *Box) SetPadded(padded bool) {
|
||||
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)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue