Added DisownAll method to Container

This commit is contained in:
Sasha Koshka
2023-01-10 18:07:51 -05:00
parent cb2136f7cb
commit b3e6beb8ad
2 changed files with 14 additions and 3 deletions

View File

@@ -20,9 +20,7 @@ func run () {
button := basic.NewButton("drawing pad")
okButton := basic.NewButton("OK")
button.OnClick (func () {
container.Disown(label)
container.Disown(button)
container.Disown(okButton)
container.DisownAll()
container.Adopt(basic.NewLabel("Draw here:"), false)
container.Adopt(basic.NewTest(), true)
container.Adopt(okButton, false)