[python-win32] Simple selection of item in list

Tim Roberts timr at probo.com
Fri Nov 19 19:43:38 CET 2010


admin at genesisware.de wrote:
> my problem is probably simple but I haven’t found a solution anyway. I want so select items from an item list that allows multiple selections.
>
> I have got the handle of a SysListView32 control and the item index of the item I want to select.
>
> How can I arrange this in pywin?

Where did the handle come from?  Is this a control within your own
application?  One of the awkward things about the SysListView32 control
is that most of its messages require structures, and the structures are
not marshaled properly across process boundaries, so it's very difficult
to control one in another process.

If it is within your own process, you can send an LVM_SETITEMSTATE
message with the appropriate LVITEM structure.

-- 
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.



More information about the python-win32 mailing list