diff options
| author | Pietro Gagliardi <[email protected]> | 2014-06-26 21:40:23 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-06-26 21:40:23 -0400 |
| commit | ebbd76716f3e35bdb86a6ca9b327bc014d7f6e3b (patch) | |
| tree | c6e5bcb45c295035b926da11ef38c3017aa64fba | |
| parent | 098beef9969ae625714de4a23c5899a70a6557ca (diff) | |
Implemented Checkbox.SetChecked() on Windows.
| -rw-r--r-- | sysdata_windows.go | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/sysdata_windows.go b/sysdata_windows.go index f3ecffe..504b715 100644 --- a/sysdata_windows.go +++ b/sysdata_windows.go @@ -635,3 +635,21 @@ func (s *sysData) center() { } <-ret } + +func (s *sysData) setChecked(checked bool) { + ret := make(chan struct{}) + defer close(ret) + uitask <- func() { + c := uintptr(_BST_CHECKED) + if !checked { + c = uintptr(_BST_UNCHECKED) + } + _sendMessage.Call( + uintptr(s.hwnd), + uintptr(_BM_SETCHECK), + c, + uintptr(0)) + ret <- struct{}{} + } + <-ret +} |
