Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Grid Class 1

Status
Not open for further replies.

AChiado

Programmer
Mar 1, 2002
49
IT
Hi all,

I've created a new class based on grid.

I can set backcolor, forecolor etc. but I cant find how I can set back and forecolor for headers so I dont have to set it in my forms.

Any suggestions?

Thanks in advance Andrea C.P.
Italy
 
I order to change your back and fore colors of your columns, you would have to either do it by code or at least create your class with an exact columncount. In your class if you put your columncount to 1, you cha change the colors right in your class.
 
HI
In your grid class.. in the init event.. add the code..

LOCAL I
WITH This.
FOR I=1 TO .columncount
** If you need single uniform color then..
** .Columns(i).Header1.BackColor = RGB(255,192,255)
** OR alternate headers in different color as below
IF MOD(i,2) = 0
.Columns(i).Header1.BackColor= RGB(128,255,255)
ELSE
.Columns(i).Header1.BackColor= RGB(255,192,255)
ENDIF
ENDFOR
ENDWITH

Play around the RGB combination to your liking.
Hope this helps :) ramani :-9
(Subramanian.G),FoxAcc, ramani_g@yahoo.com
 
It's so simple!!!

Thank you very much! Andrea C.P.
Italy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top