?
Solved

MSFlexGrid & CellForeColor

Posted on 2003-03-03
4
Medium Priority
?
702 Views
Last Modified: 2012-06-22
Hi there,
I am populating a flexgrid in VB with the results of a query to an Access database. On retrieving the results i want to set the fore color of the flexgrid to a different color dependant on the nature of the result; i.e. if the result matches one criteria set the text to blue, otherwise set it to black. Any Ideas?
0
Comment
Question by:EoghanMac
3 Comments
 
LVL 2

Accepted Solution

by:
IeuanJ earned 200 total points
ID: 8058091
Assuming x is your row, y is your column, myValue is your value and yes is the value for which the color needs to be blue.



MSFlexGrid1.row = x
MSFlexGrid1.col = y
if myValue = yes then
  MSFlexGrid1.cellforecolor=VBBlue
else
  MSFlexGrid1.cellforecolor=VBBlack
end if
0
 
LVL 1

Expert Comment

by:spiritwithin
ID: 8058481
And make use of the RGB() function to get further colors if needed.
0
 

Expert Comment

by:CleanupPing
ID: 9447393
EoghanMac:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
Simple Linear Regression

621 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question