MCPcopy Create free account
hub / github.com/lxn/walk / setItemCount

Method setItemCount

tableview.go:929–944  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

927}
928
929func (tv *TableView) setItemCount() error {
930 var count int
931
932 if tv.model != nil {
933 count = tv.model.RowCount()
934 }
935
936 if 0 == win.SendMessage(tv.hwndFrozenLV, win.LVM_SETITEMCOUNT, uintptr(count), win.LVSICF_NOINVALIDATEALL|win.LVSICF_NOSCROLL) {
937 return newError("SendMessage(LVM_SETITEMCOUNT)")
938 }
939 if 0 == win.SendMessage(tv.hwndNormalLV, win.LVM_SETITEMCOUNT, uintptr(count), win.LVSICF_NOINVALIDATEALL|win.LVSICF_NOSCROLL) {
940 return newError("SendMessage(LVM_SETITEMCOUNT)")
941 }
942
943 return nil
944}
945
946// CheckBoxes returns if the *TableView has check boxes.
947func (tv *TableView) CheckBoxes() bool {

Callers 2

attachModelMethod · 0.95
SetModelMethod · 0.95

Calls 3

newErrorFunction · 0.85
RowCountMethod · 0.65
SendMessageMethod · 0.65

Tested by

no test coverage detected