summaryrefslogtreecommitdiff
path: root/redo/zz_test.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-08-20 21:21:45 -0400
committerPietro Gagliardi <[email protected]>2014-08-20 21:21:45 -0400
commitb964c564e7a7d7a460dbcf922f4ceeb5368def50 (patch)
tree4573927e1f9b7e025cfe6fbffa65f45e309691d7 /redo/zz_test.go
parentf60e888c38dc866b3110145dfdfeffff0c0e0f40 (diff)
Added Table.OnSelected() and implemented it on Windows.
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)