Table - background and foreground color 
Author Message
 Table - background and foreground color

Hi, all:

Is it possible to change background and/or  foreground color in a table so
some of the records can have different background or foreground than the
rest?
Can it be done in a free table? If so, how? All hints are appreciated -
programatically or other way.

TIA

Mark



Tue, 06 Sep 2005 01:56:00 GMT  
 Table - background and foreground color
Hello, Mark!
You wrote  on Thu, 20 Mar 2003 12:56:00 -0500:

 MC> Is it possible to change background and/or  foreground color in a table
 MC> so some of the records can have different background or foreground than
 MC> the rest?
 MC> Can it be done in a free table? If so, how? All hints are appreciated -
 MC> programatically or other way.

 MC> TIA

 MC> Mark

You can do this with the grid control and with a browse window. Here's a way
to change the browse window color. A similar technique can be used with grid
controls. Let us know if you need help with that.

SELECT yourtable
BROWSE NAME oGrid NOWAIT
oGrid.SetAll("DynamicBackColor", [IIF(MOD(RECNO("yourtable"), 2) = 0,
16777215, 255)], "Column")
oGrid.SetAll("DynamicForeColor", [IIF(MOD(RECNO("yourtable"), 2) = 0, 0,
16777215)], "Column")

---
Eric den Doop
www.foxite.com - The Home Of The Visual FoxPro Experts - Powered By VFP8



Tue, 06 Sep 2005 02:02:11 GMT  
 Table - background and foreground color
Thank you Eric,

It works fine for me - I adjusted your code to my needs and it rocks.

Mark



Quote:
> Hello, Mark!
> You wrote  on Thu, 20 Mar 2003 12:56:00 -0500:

>  MC> Is it possible to change background and/or  foreground color in a
table
>  MC> so some of the records can have different background or foreground
than
>  MC> the rest?
>  MC> Can it be done in a free table? If so, how? All hints are
appreciated -
>  MC> programatically or other way.

>  MC> TIA

>  MC> Mark

> You can do this with the grid control and with a browse window. Here's a
way
> to change the browse window color. A similar technique can be used with
grid
> controls. Let us know if you need help with that.

> SELECT yourtable
> BROWSE NAME oGrid NOWAIT
> oGrid.SetAll("DynamicBackColor", [IIF(MOD(RECNO("yourtable"), 2) = 0,
> 16777215, 255)], "Column")
> oGrid.SetAll("DynamicForeColor", [IIF(MOD(RECNO("yourtable"), 2) = 0, 0,
> 16777215)], "Column")

> ---
> Eric den Doop
> www.foxite.com - The Home Of The Visual FoxPro Experts - Powered By VFP8



Tue, 06 Sep 2005 04:54:18 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. background color when printing

2. background color

3. changing background color of ole Calendar Control

4. Window background color

5. form control background color?

6. newbie- Views & background color

7. Checkbox- How to change background color when Disabled

8. changing background color of ole Calendar Control

9. display different background color for active TEXTBOX

10. VFP 5.0: Forms with the default background-color?

11. Background color for a cmd button

12. Changing Background Color Of A Button

 

 
Powered by phpBB® Forum Software