I'm trying to create a Firemonkey TGrid which will show values with changing background colors depending on the value, but I cannot seem to get the hang of the new Styles thing in firemonkey.
I have followed the advice and structure of Firemonkey Grid Control - Styling a Cell based on a value (via the OnGetValue function call) and created the custom TTextcel derivative, but I still cannot find how to change the background color.
I tried FindStyleResource('background') as TRectangle
but this always returns nil.
Can anybody get me on the righ track with this?
[Additional Info]
Done what Mike Sutton suggested and it is started to dawn on me ;)
The Edit box gave me a Layout-structure, and I'v managed to link that to my TTExtCel control. This way I'v been able to change the foreground color through the foreground: BrushObject
.
But the background is done with a TSubImage and a TRectAnimation. If I understand correctly, the TSubimage takes a part of Windows7 Style.png
and displays this in the Editbox. How can I replace the TSubImage with a TRectangle so I can alter the BrushColor? The Structure and Properties editor windows don't allow me to add any style elements other then TLayout...