Help with sysListView selection
I'm working on ColumnsReview add-on, but I have a very specific question about sysListView, so nvda-devel could be a good place too...
I'd like to select/unselect programmatically one or more list items, but it seems not so easy indeed. I found this promising page:
and so, starting from a list item and opening NVDA console, I wrote:
from NVDAObjects.IAccessible.sysListView32 import *
LVM_SETITEMSTATE = (LVM_FIRST + 43)
but then I don't know how to proceed exactly. I tried creating an LVITEM instance (class is in sysListView32) with various mask/state/etc parameters, and passing it as 4th arguments of
watchdog.cancellableSendMessage(nav.parent.windowHandle, LVM_SETITEMSTATE, -1, LVITEMInstance)
but even if I receive no errors, I don't see changes... and I tried and tried various solutions, with LPARAM, and so on, without success.
Do you have any suggestions?
Thanks in advance.