I have a custom control grid with various records in it, depending on certain values the row attributes, such as BG colour, font colour etc are changed.
This works fine by using the draw events of the control
AFont.Color := clRed;
However I want to enable the users to set these colours themselves, so I have another table with values like this
The I try to set the colour in the same draw event like this:
AFont.Color := TColor(QueryColourSel.AsString);
but this doesn't work, the reason I'm not storing cl colour values in the table is because I want additional colours that are not standard.
Any suggestions on why this doesn't work, no errors are produced, but the colour doesn't change.