VFP 6.0 - Changing grid cell colors

VFP 6.0 - Changing grid cell colors

Post by Matt Korngut » Mon, 14 Feb 2000 04:00:00



Is there a way to change the BackColor of an individual cell in a grid.
I'm able to change to BackColor of an entire row or column, but not an
individual cell.

any help is greatly appreciated. Please reply to:


or to this group. Thanks in advance.

 
 
 

VFP 6.0 - Changing grid cell colors

Post by Shar Feldhei » Mon, 14 Feb 2000 04:00:00


Check out the DYNAMICCOLOR property for the cell


> Is there a way to change the BackColor of an individual cell in a grid.
> I'm able to change to BackColor of an entire row or column, but not an
> individual cell.

> any help is greatly appreciated. Please reply to:


> or to this group. Thanks in advance.

--
S. Feldheim
PC Software,INC - Visual Foxpro Application Development
***************************************************
Please use the "Office" address for replies.
***************************************************
 Web Site: <http://www.threedub.com>
***************************************************



 
 
 

VFP 6.0 - Changing grid cell colors

Post by Fred - Armon » Mon, 14 Feb 2000 04:00:00


Look at the dynamicbackcolor of the column

Matt Kornguth a crit:

> Is there a way to change the BackColor of an individual cell in a grid.
> I'm able to change to BackColor of an entire row or column, but not an
> individual cell.

> any help is greatly appreciated. Please reply to:


> or to this group. Thanks in advance.

--
Fred - Armoni (France)
The House Is Rockin'


 
 
 

VFP 6.0 - Changing grid cell colors

Post by Kobi » Tue, 15 Feb 2000 04:00:00



>Is there a way to change the BackColor of an individual cell in a grid.
>I'm able to change to BackColor of an entire row or column, but not an
>individual cell.

>any help is greatly appreciated. Please reply to:


>or to this group. Thanks in advance.

try this:
in event gotfocus only! in grid1.column1.text1 write:

ThisForm.Grid1.SetAll("DynamicBackColor","IIF(ThisForm.Grid1.ActiveRow/ThisF
orm.Grid1.ActiveRow=1,RGB(0,0,128), RGB(255,255,255))", "Column")
ThisForm.Grid1.SetAll("DynamicForeColor","IIF(ThisForm.Grid1.ActiveRow/ThisF
orm.Grid1.ActiveRow=1,RGB(255,255,255), RGB(0,0,0))", "Column")

this code change color of row which have a focus