Accessing element in SysListView32 column

Class library usage, coding and language questions.
Posts: 1
Joined: Thu Dec 11, 2008 4:21 am

Accessing element in SysListView32 column

Post by syed.hasan » Mon Dec 15, 2008 5:49 am


I have a SysListView32 control which has one column containing text and 3 columns containing images(each has associated context menus).

When I try to get the children on the ListItem, FindChildren returns 0 children.
Is there a way to access the elements in a [row,column] cell of the ListView and perform actions such as identify which image is displayed or right-click to get context menu?

I use Ranorex 1.5.1.

Thanks in advance!

User avatar
Support Team
Site Admin
Site Admin
Posts: 12169
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA

Post by Support Team » Mon Dec 15, 2008 11:12 am

The ListView class provides methods to access items and subitems of a listview. The RxListViewGetItemImageIndex method, for example, retrieves the index in the corresponding image list of the image shown in the specified subitem.
The GetSubItemLocation and GetSubItemSize methods retrieve the position and size of the specified listview subitem, you can use the position to click on the subitem with the right mouse button to open the context menu.

Ranorex Support Team