summaryrefslogtreecommitdiff
path: root/redo/table_windows.go
diff options
context:
space:
mode:
Diffstat (limited to 'redo/table_windows.go')
-rw-r--r--redo/table_windows.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/redo/table_windows.go b/redo/table_windows.go
index 71049b5..41aa363 100644
--- a/redo/table_windows.go
+++ b/redo/table_windows.go
@@ -62,6 +62,18 @@ func (t *table) LoadImageList(il ImageList) {
il.apply(t._hwnd, C.LVM_SETIMAGELIST, C.LVSIL_SMALL)
}
+func (t *table) Selected() int {
+ t.RLock()
+ defer t.RUnlock()
+ return int(C.tableSelectedItem(t._hwnd))
+}
+
+func (t *table) Select(index int) {
+ t.RLock()
+ defer t.RUnlock()
+ C.tableSelectItem(t._hwnd, C.intptr_t(index))
+}
+
//export tableGetCell
func tableGetCell(data unsafe.Pointer, item *C.LVITEMW) {
t := (*table)(data)