Solved

dbgrid selection bar color change

Posted on 2000-02-22
4
391 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
cobramani I think that I have to set the windows setup like that. Thanks for your idea

Pandian
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

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…
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…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

728 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now