Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
310
Determining a variety of colour-based properties in an UltraGrid?
posted

Hi, in a number of the grids I am testing there are some highlighting rules that I need to test. For example when I select a row, the entire row will be highlighted red if a certain condition relating to the data in some of the cells is met, else it will highlight silver. Additionally the font colour of the text will change also (to provide best contrast with the red or silver row highlighting). So I need to know the way to determine the row (or, indeed, the cell) colour, and a cell's font colour.

Now I can see a whole bunch of properties in the .NET spy in QTP as part of the Rows collection (BackColor, FontData etc), and this question would seem quite easy to answer, BUT according to the developers they are not using those properties to set any colours. Instead they are using UltraGridColumn.ValueBasedAppearanceto set these colour propertiesand as such all of the values I can see in .NET Spy relating to colours for a row are 'Default' or white, regardless of the actual colouring that is showing on the row itself.

Is there any way to get to the actual colours that are being displayed??

Cheers, Ryan