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

How to color single cell in TStringGrid ?;

Posted on 2004-04-13
Last Modified: 2010-08-05
Is any way how to color single cells  (TS1.Cells[r,s]  ) in TStringGrid ?
Question by:hatina
LVL 17

Accepted Solution

mokule earned 50 total points
ID: 10811442

procedure TForm1.StringGrid1DrawCell(Sender: TObject; ACol, ARow: Integer;
  Rect: TRect; State: TGridDrawState);
  if (ACol = 3) and (ARow = 2) then
    with StringGrid1 do
      Canvas.Brush.Color := clYellow;
      Canvas.TextOut(Rect.Left+2,Rect.Top+2,Cells[ACol, ARow]);

Author Comment

ID: 10812096
Thank you, it suits. Points are yours

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

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

Suggested Solutions

Title # Comments Views Activity
code issue 8 155
Print Graphic and Text to Epson TM-T88v 12 386
Delphi: barcode reading on android platform 1 51
How to make Sign in, using Clientdataset? 1 28
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…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
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…

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