Change text of field in twwdbgrid when selected (highlighted)
Posted on 2008-10-06
Currently in OnDrawDataCell function of a TwwDBGrid, I change the color of the text in a particular field if certain criteria is meet. For instance:
if s = 'SomeCondition' then
(Sender as TwwDBGrid).Canvas.Font.color := clBlue;
(Sender as TwwDBGrid).Canvas.TextRect(rect,rect.left,rect.Top + 2, qry.FieldByName('Subject').asString);
I am changing the field in some rows to have blue text. Not all rows have this text color. However, when a row with the blue text is selected (highlighted) the text is hard to see. This is becuase the row is "highligted" in a shade of blue too. I would like the text to be aqua if the row is highlighted and blue if it is not. Does anyone know how to do this?