Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Make the whole row of the grid to use the same forecolor
Message
 
To
04/07/2001 04:03:30
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00525731
Message ID:
00526673
Views:
13
Cetin,

As another alternative, this is a class you can download which seems to accomplish your goal and more...

http://www.levelextreme.com/wconnect/wc.dll?UniversalThread~?2,54,Forum=5,28,1324


or code it out as I did :


1) CREATE A FORM PROPERTY CALLED RECNO (OR SOMETHING) AND SET VALUE TO 0


2) IN THE INIT EVENT OF THE GRID:

this.column1.text1.selectedbackcolor = rgb(255,255,128)


3) IN THE AFTERROWCOLCHANGE EVENT OF THE GRID:

LPARAMETERS nColIndex

this.refresh()

* set selected cell colors
mycolumn="column"+alltrim(str(nColIndex))
WITH this.&mycolumn..text1
.selectedbackcolor = rgb(255,255,128) &&0,255,64)
.backcolor = this.&mycolumn..text1.selectedbackcolor
.selectedforecolor = rgb(0,0,0)
.forecolor = this.&mycolumn..text1.selectedforecolor
ENDWITH



4)IN THE RFRESH METHOD OF THE GRID:

Thisform.recno = recno("TABLENAME")
This.setall("Dynamicbackcolor","iif(recno('TABLENAME')=thisform.vbrecno,rgb(255,255,128),rgb(255,255,255))","Column")




Regards,

Todd
The day you take complete responsibly for yourself, the day you stop making any excuses, thats the day you start to the top. - O.J. Simpson

Great advice from a questionable source...
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform