Tiny little bug: win32lib 0.57.9 & lvCheckBoxes
- Posted by Andy Serpa <renegade at earthling.net> Oct 05, 2002
- 396 views
Hello, In the function "getLVChecked", I've changed a line to: lFlags = sendMessage(id,LVM_GETITEMSTATE,index-1,LVIS_STATEIMAGEMASK) I added the "-1" to "index" so it adjusts properly for zero-indexing. This was also screwing up the getLVAllChecked function. By the way, I couldn't find a way to "check" (or uncheck) a check box in a listview, but I came up with this: addr=struct_LVITEM(LVIF_STATE,row-1,0,8192,LVIS_STATEIMAGEMASK,0,0,0) void=sendMessage(lvID,LVM_SETITEMSTATE,row-1,addr) which does the trick. Changing the 8192 to 4096 will uncheck a box. I don't really know what I'm doing with this stuff, so let me know if I've got something wrong.