?
Solved

dbgrid selection bar color change

Posted on 2000-02-22
4
Medium Priority
?
418 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 30 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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses
Course of the Month14 days, 23 hours left to enroll

840 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