summaryrefslogtreecommitdiff
path: root/sysdata_windows.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-02-15 18:14:43 -0500
committerPietro Gagliardi <[email protected]>2014-02-15 18:14:43 -0500
commit14aaad6be38d6ec23ac6b14d76496f8a38676597 (patch)
treeacc77ceb440d49ffd23231046558031124f084ad /sysdata_windows.go
parent3c25b58652b55ee27a8c3c1f09e88a1eb593ca39 (diff)
Added Combobox.Delete() and Listbox.Delete() and added some TODOs.
Diffstat (limited to 'sysdata_windows.go')
-rw-r--r--sysdata_windows.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/sysdata_windows.go b/sysdata_windows.go
index 0cbf4de..f0ecbf3 100644
--- a/sysdata_windows.go
+++ b/sysdata_windows.go
@@ -467,3 +467,23 @@ func (s *sysData) setWindowSize(width int, height int) error {
}
return nil
}
+
+func (s *sysData) delete(index int) (err error) {
+ ret := make(chan uiret)
+ defer close(ret)
+ uitask <- &uimsg{
+ call: _sendMessage,
+ p: []uintptr{
+ uintptr(s.hwnd),
+ uintptr(classTypes[s.ctype].deleteMsg),
+ uintptr(_WPARAM(index)),
+ uintptr(0),
+ },
+ ret: ret,
+ }
+ r := <-ret
+ if r.ret == uintptr(classTypes[s.ctype].selectedIndexErr) {
+ return fmt.Errorf("failed to delete item from combobox/listbox (last error: %v)", r.err)
+ }
+ return nil
+}