summaryrefslogtreecommitdiff
path: root/redo/zz_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'redo/zz_test.go')
-rw-r--r--redo/zz_test.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/redo/zz_test.go b/redo/zz_test.go
index e1eb8fc..f3392ad 100644
--- a/redo/zz_test.go
+++ b/redo/zz_test.go
@@ -140,6 +140,16 @@ func (tw *testwin) make(done chan struct{}) {
*idq = tw.icons
tw.icontbl.Unlock()
tw.icontbl.LoadImageList(tw.il)
+ tw.icontbl.OnSelected(func() {
+ s := fmt.Sprintf("%d ", tw.icontbl.Selected())
+ tw.icontbl.RLock()
+ defer tw.icontbl.RUnlock()
+ idq := tw.icontbl.Data().(*[]icon)
+ for _, v := range *idq {
+ s += strings.ToUpper(fmt.Sprintf("%v", v.Bool)[0:1]) + " "
+ }
+ tw.w.SetTitle(s)
+ })
tw.t.Append("Image List Table", tw.icontbl)
tw.group2 = NewGroup("Group", NewButton("Button in Group"))
tw.t.Append("Filled Group", tw.group2)