Forum Discussion

jsayre's avatar
jsayre
Occasional Contributor
11 years ago

text color on listview objects

I am working with a normal listview and I am trying to verify the color of a specific object from the collection. The color should be defined as the forecolor (so I am told by our development team) but I can't get any good data to return.



Currently, I am using a jscript to iterate through the collection just trying to grasp at straws. I know that the color of the 19th item, 7th sub item {wItem(19,7)} should show as red. I can get it to return the proper text to me, but when I try to pull the color or forecolor property, I get blank back.



Any suggestions?



I saw a post about this from a long time ago (2005) on sqaforums.com but, they weren't really of any help.

1 Reply

  • Hi Jeremy,

     


    I don't know what approach you are using to get the color of the list item. I would suggest that you analyze this How To script. It detects the predominant color in the controls image and returns it. In most cases, this is the background color of the control. You could modify this script a bit to pass the list item's image instead of the control's one to the getBKColor function.