I'm using the Infragistics document engine and I want to independently set the colour of the font in each cell. I.e
Dim cell8Row2Table2 As ITableCell = Row2Table2.AddCellDim cell8Row2Table2Text As IText = container.AddTextcell8Row2Table2Text.Style.Brush = Infragistics.Documents.Graphics.Brushes.DarkGreen cell8Row2Table2Text.AddContent("Some stuff")
Dim cell9Row2Table2 As ITableCell = Row2Table2.AddCellDim cell9Row2Table2Text As IText = container.AddTextcell9Row2Table2Text.Style.Brush = Infragistics.Documents.Graphics.Brushes.DarkRedcell9Row2Table2Text.AddContent("Some different coloured stuff")
As you can see I create a text item for each cell and set the colour. Problem is that when I do this all cells seem to end up with the same colour. As though I've set the colour for the whole band. How would I go about doing this?
You're right! I need to create independant styles for each type else they're all changed.
Thanks!
Are they all using the same color as the last color that you assigned? Maybe they're all using the same Style object and since these properties aren't really looked at until the report is published, the last value that you set overrides the previous ones. You could try creating a new Style object for each color that you want and reuse that.
-Matt