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,
ccount=Browser("Brwsr").Page("Pg").Frame("Frame").SwfObject("obj").SwfTreeView("tree").GetItemsCountmsgbox ccountSet 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 IfNext
Please help me as i am stuck.
Hey Mike,
It is working fine now. I checked it with quite a wait statement and it works absolutely fine.
Words arent enough to express the help you have provided. Thank you once again mike.
Please ignore my above post. Sorry for the inconvienence.
Appreciate your timely response and your patience.
Warm Regards,
Basanth
Hello Mike,
Thank you very much for the response. Honestly, this has helped me to resolve the issue upto 80%. The only roadblock i have is in activating the item. Let me explain what i am going through now,
When i manually click on the item and try the tree.object.activenode.override.nodappearance.forecolor it does return color[magenta] which is what i am looking for.
But if i loop through and activate the item per path the item seems to be highlighted but it returns color[empty] which is similar to not being selected. Thus i determined that the item isint being highlighted or activated. Below i have attached the differences in highlight. Can you please take a look and let me know how do we activate the item.
Thank you,
Robert.
Hi Robert,
There are two ways to get the color of the Node. In both cases you need to start with the the node. So continuing from our previous example that loops through the nodes and activates them here:
http://forums.infragistics.com/forums/p/8043/32724.aspx#32724
While this loops through them, you could of course directly access a node by giving it's path, that aside in either case you have the path to the node. The easist solution would be to start by activating the node. As we did in the previous example, then you can use the .Net object model of the UltraWinTree to access the properties of it.
nodeColor = tree.Object.ActiveNode.Override.NodeAppearance.ForeColor MsgBox nodeColor
For more detailed information about the our .NET object model you can look to our online help. While it only goes back to NetAdvantage release 7.2, a majority of the basic commonly used settings have been there from the start. Also to help verify if something is new or not, each help subsection, WindowsForms and ASP.NET has a Developers Guide under which is What's New that contains a revision history that describes all the changes in the past releases.
http://ko.infragistics.com/support/documentation.aspx#OnlineDocumentation