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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

grid's DYNAMICFORECOLOR/DYNAMICBACKCOLOR for newbies

Status
Not open for further replies.

torturedmind

Programmer
Jan 31, 2002
1,052
PH
here is a simple code for changing DynamicForeColor or DynamicBackColor of a grid with unknown number of columns.
local curcol

with this
.recordsourcetype = 1
.recordsource = "dbsched"
for i = 1 to .columncount
curcol = "column" + alltrim(str(i))
.&curcol..dynamicforecolor = ;
"iif(not dbsched.dbactive, rgb(128,128,128), rgb(0,0,0))"
endfor
endwith


hope this helped the newbies...

kilroy [trooper]
 
i guess i was in a hurry that i forgot to say where to put the code. please put it in the grid's INIT event. sorry about that. [peace]

kilroy [trooper]
 
DSummZZZ's FAQ faq184-3098 titled "How do I change grids' row/column colors/fonts, ... " is very helpful in demonstrating what one can do withing a grid.

Brian


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top