Micro Focus QTP (UFT) Forums
How to retrieve color of a particular item within a swftreeview - 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: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: How to retrieve color of a particular item within a swftreeview (/Thread-How-to-retrieve-color-of-a-particular-item-within-a-swftreeview)



How to retrieve color of a particular item within a swftreeview - robert27 - 06-13-2008

Hello all,

I am working on a .net based application which has testadvantage version 2006 Volume 1(CLR 2.0). The controls used are from infragistics. The versions of test advantage and net adtvantage are same.

Here is my issue,

I have few items in a swftreeview. One of the item is magenta colored. I have to retireve the color from the object. When i try the forecolor and the backgroundcolor it prints empty.The object spy as well shows the same. Is there a way to find the color of the particular item ??

Here is a piece of the code,


Code:
ccount=Browser("Brwsr").Page("Pg").Frame("Frame").SwfObject("obj").SwfTreeView("tree").GetItemsCount
msgbox ccount
Set tree=Browser("Brwsr").Page("Pg").Frame("Frame").SwfObject("obj").SwfTreeView("tree")
ord=Split(tree.GetContent,VBLF)
For r=0 to ccount-1
    item_name=Browser("Brwsr").Page("Pg").Frame("Frame").SwfObject("obj").SwfTreeView("tree").GetItem(r)
    msgbox item_name  
item_exist=Instr(item_name,"checker")
If item_exist <> 0 Then
       a=Browser("Brwsr").Page("Pg").Frame("Frame").SwfObject("obj").SwfTreeView("tree").Object.Forecolor
       msgbox a
  End If
Next