Micro Focus QTP (UFT) Forums
SwfList: unchecked all items - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: SwfList: unchecked all items (/Thread-SwfList-unchecked-all-items)



SwfList: unchecked all items - robertosalemi - 12-21-2015

Hi,
I have this SwfComboBox whin in SwfList (checkbox + label):
[Image: uft_swflist_swfcombobox.png]

I would unchecked or deselect all items of SfwList.

I try with this code:
Code:
listItemCount = SwfWindow("Task List").SwfComboBox("filter_checkedComboBox").Object.Items.Count
        
For iterator = 0 To listItemCount - 1
    itemCurrent = SwfWindow("Task List").SwfWindow("ccbParent").SwfList("cclb").GetItem(iterator)
    SwfWindow("Task List").SwfWindow("ccbParent").SwfList("cclb").Deselect(itemCurrent)
Next

But this code generates one error and if combobox is not open GetItem(iterator) not works.

How can I resolve it?

Thanks.