dbgrid selection bar color change

Hi All

                      Can anyone suggest me how to change dbgrid selection bar color.
                   Default is dark blue.
                   My problem
                   *********
                        I am changing certain grid column colors for certain conditions.
                        I given rowselect = true
                        Now the colored columns are not readable when the selection bar is there. If I change the
                   selection bar color to some light color or transparent then I can view those columns

   Note: I would like to change it for a particular grid , not all the grids

                   thanks in advance
                   Pandian
Pandian012000Asked:
Who is Participating?
 
cobramaniaConnect With a Mentor Commented:
I use this method :

procedure TfBukuCustomer.GridDrawColumnCell(Sender: TObject;
  const Rect: TRect; DataCol: Integer; Column: TColumn;
  State: TGridDrawState);
begin
  if dmManager.qPiutangCustSt.Value then Grid.Canvas.Font.Color := clRed;
    Grid.DefaultDrawColumnCell(Rect, DataCol, Column, State);
end;


it makes the row color to red if St in qPiutangCust true
and back to white / default if ST false

Hope this helps
0
 
Pandian012000Author Commented:
Hi cobramani

I am appriciate your reply, but I need to change the grid selection bar color not the grid row color.

Any suggestion welcome

pandian
0
 
cobramaniaCommented:
grid selection bar ?
hmmm.......is it blue on default color ?
if it is then the only way to change it is to go to desktop properties....

Hope this helps :)
0
 
Pandian012000Author Commented:
cobramani I think that I have to set the windows setup like that. Thanks for your idea

Pandian
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.