DEBUG: add Hide(), Show() and Delete() for *ui.Tab
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
6438e4cc6a
commit
6d401ea14a
|
@ -69,6 +69,57 @@ func makeWindowDebug() ui.Control {
|
|||
gw.UiTab.SetMargined(*gw.TabNumber, true)
|
||||
})
|
||||
|
||||
b3 := addButton(vbox, "Hide()")
|
||||
b3.OnClicked(func(*ui.Button) {
|
||||
x := cbox.Selected()
|
||||
log.Println("x =", x)
|
||||
log.Println("findBox; names[x] =", names[x])
|
||||
findBox(names[x])
|
||||
gw := findBox(names[x])
|
||||
if (gw == nil) {
|
||||
return
|
||||
}
|
||||
if (gw.UiTab == nil) {
|
||||
return
|
||||
}
|
||||
gw.UiTab.Hide()
|
||||
})
|
||||
|
||||
b4 := addButton(vbox, "Show()")
|
||||
b4.OnClicked(func(*ui.Button) {
|
||||
x := cbox.Selected()
|
||||
log.Println("x =", x)
|
||||
log.Println("findBox; names[x] =", names[x])
|
||||
findBox(names[x])
|
||||
gw := findBox(names[x])
|
||||
if (gw == nil) {
|
||||
return
|
||||
}
|
||||
if (gw.UiTab == nil) {
|
||||
return
|
||||
}
|
||||
gw.UiTab.Show()
|
||||
})
|
||||
|
||||
b5 := addButton(vbox, "Delete()")
|
||||
b5.OnClicked(func(*ui.Button) {
|
||||
x := cbox.Selected()
|
||||
log.Println("x =", x)
|
||||
log.Println("findBox; names[x] =", names[x])
|
||||
findBox(names[x])
|
||||
gw := findBox(names[x])
|
||||
if (gw == nil) {
|
||||
return
|
||||
}
|
||||
if (gw.UiTab == nil) {
|
||||
return
|
||||
}
|
||||
if (gw.TabNumber == nil) {
|
||||
return
|
||||
}
|
||||
gw.UiTab.Delete(*gw.TabNumber)
|
||||
})
|
||||
|
||||
return hbox
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue