Solved

dbgrid selection bar color change

Posted on 2000-02-22
4
403 Views
Last Modified: 2010-04-04
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
0
Comment
Question by:Pandian012000
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 1

Accepted Solution

by:
cobramania earned 10 total points
ID: 2558443
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
 

Author Comment

by:Pandian012000
ID: 2600329
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
 
LVL 1

Expert Comment

by:cobramania
ID: 2600381
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
 

Author Comment

by:Pandian012000
ID: 2603315
cobramani I think that I have to set the windows setup like that. Thanks for your idea

Pandian
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question