Re: Help with sysListView selection
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.
In fact, the fourth parameter of watchdog.cancellableSendMessage, or the second parameter of the LVM_SETITEMSTATE message, is not an instance of the LVITEM structure, but a pointer to this instance.
Here is an example for selecting all items that works here on the desktop, under a Windows-10.
It is imperative that the type of your list view is as follows:
For example, you can put your nav object on the first parent of the desktop window or use focus.parent.windowHandle in your console.
Once on your desktop, you open the Python console with NVDA + Control + Z.
This done, you write the following:
from NVDAObjects.IAccessible.sysListView32 import *
For unselecting all items you juste have to assign LVIF_STATE to the mask member and LVIS_SELECTED to stateMask as described here:
However, I find that it does not always work, so it's not really reliable.
You will find a detailed description of the members of the LVITEM structure on Microsoft Doc:
Hope this helps.
Le 05/04/2019 à 19:27, Alberto Buffolino a écrit :