Implemented Checkbox.SetChecked() on Windows.

This commit is contained in:
Pietro Gagliardi 2014-06-26 21:40:23 -04:00
parent 098beef996
commit ebbd76716f
1 changed files with 18 additions and 0 deletions

View File

@ -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
}