Solved

dbgrid selection bar color change

Posted on 2000-02-22
4
400 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
  • 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

828 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