ListView containing CheckBoxes

Class library usage, coding and language questions.
gnutt080766
Posts: 3
Joined: Thu Sep 27, 2007 6:34 pm

ListView containing CheckBoxes

Post by gnutt080766 » Wed Dec 05, 2007 6:24 pm

Ranorex Team,

I have a ListView that has ListItems that have CheckBoxes. The CheckBoxes are under the first column off the ListView. I am able to get access to the text in the other columns of each ListItem, but unable to get access to the value of the CheckBox (I need to know if it is checked or unchecked). If I use the Spy Tool it reports each item as a ListItem but it does not seem to notice the CheckBox.

What do I need to do to access a CheckBox in a ListView?

Thanks

Gary Nuttall

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Post by Support Team » Wed Dec 05, 2007 6:54 pm

The ListView class will come with the following new functions in the next version V1.4 (and with some other ones):

Code: Select all

ListView.IsItemChecked(index);
ListView.CheckItem(index);
ListView.UncheckItem(index);
We can send you the first V1.4 Beta Version if you send us your company information.
If I use the Spy Tool it reports each item as a ListItem but it does not seem to notice the CheckBox.
Does the RanorexSpy show "checked" in the Element State field?
If yes, then you can also use the Element class to retrieve the check information.

Jenö
Ranorex Team

gnutt080766
Posts: 3
Joined: Thu Sep 27, 2007 6:34 pm

Post by gnutt080766 » Wed Dec 05, 2007 7:20 pm

The RanorexSpy Tool shows "selectable" not "checked" when I spy on a checked CheckBox in a ListView.

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Post by Support Team » Wed Dec 05, 2007 9:56 pm

Is the control a .NET control?
(Has the control a control name?)
Is the control an owner draw control?

Jenö
Ranorex Team

gnutt080766
Posts: 3
Joined: Thu Sep 27, 2007 6:34 pm

Post by gnutt080766 » Wed Dec 05, 2007 11:37 pm

The control does not have a control name and I do not believe it is a .NET control. Its class name according to RanorexSpy is SysListView32.

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Post by Support Team » Thu Dec 06, 2007 1:12 pm

Its class name according to RanorexSpy is SysListView32.
This is a Microsoft C++ control, the same control will be used in the dialog:

Start->Settings->Control Panel->Regional and Language Options->Advanced Tab

Can you please check this dialog in your computer.
Does the RanorexSpy show "checked" in the Element State field for the list view in this dialog?

Can you send us a sample application with your control?
I would like to check the new function ListView.IsItemChecked() with the trunk version.

Jenö
Ranorex Team