Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > General

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 12-16-2003, 04:39 PM
mrbox mrbox is offline
Senior Member
 
Join Date: Oct 2002
Posts: 103
Default "StringGrid: Cells COLOR" for Delphi 7

Hi there,

I'm working with a StringGrid and I need to put diferents colors in the cells, like this:
--------------------------------------------------
StringGrid.Cells[0,1].Color := clYellow
and
StringGrid.Cells[0,2].Font.Color := clWhite
--------------------------------------------------

I've worked with Delphi 5 and I used a component that did it, but, now I need to work with Delphi 7 and this component doen't work in this Delphi version.

Any Help?

Thanks very much.
jairobox
Reply With Quote
  #2  
Old 12-17-2003, 12:09 AM
mshkolnik mshkolnik is offline
Senior Member
 
Join Date: Jul 2001
Posts: 4,195
Default RE: "StringGrid: Cells COLOR" for Delphi 7

Your code don't work in _ANY_ version of Delphi. D5 doesn't support it.

If you want to draw some rows/cells in different colors/fonts, you must use OnDrawCell event for TStringGrid.

See a sample:
http://www.scalabium.com/faq/strgrid.zip

With best regards, Mike Shkolnik
http://www.scalabium.com
Reply With Quote
  #3  
Old 12-17-2003, 05:40 AM
jamiguel77 jamiguel77 is offline
Senior Member
 
Join Date: Jan 2002
Posts: 1,155
Send a message via MSN to jamiguel77 Send a message via Yahoo to jamiguel77
Default RE: "StringGrid: Cells COLOR" for Delphi 7

hi, download from delphi section:

http://www.hoerstemeier.com/

a component anmed: StringAlignGrid

is a good component: have some good properties: sortcolumn/row, colorcell, colorrow, ....


accept if help you
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT. The time now is 03:07 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.