Color Coding Multiple Rows in Combo Box

T

tekari

Hi -

I was wondering if there was a way to color code the rows of a combo
box based after the value entered. For example,

If the combo box is displaying the contents of field1 (numbers) which
are 1, 2, 3, 4, 1, 2

I would want all 1's to be red, 2's yellow etc.

I'm able to color code a single value at a time using the "ForeColor"
command but, I'm not sure if there is a way to color them all?

Thanks for any help,

~ Eric
 
G

gllincoln

Hi Tekari,

I think I understand the question but I don't really like the design as a concept being applied to a combo box and not sure that what you describe is doable, in any case. Might be able to do that with an FMS rich text component but this is hardly a recommendation - those 3rd party objects bring along closets full of skeletons and little surprises.

If the data needs to be color-coded according to digit and the field contains several digits then to my way of thinking the data is badly stored - it should be one digit per field or per row depending on the construction. However putting that aside, if I was intent upon displaying the data the way you have described, to give that appearance for the sake of providing the user with a necessary visual cue - I might create six (or as many as needed, borderless text boxes just wide enough to comfortably hold a single character, unbound without labels, tightly placed border touching border, parse out the numbers out one digit per box, and color code each textbox using a select case statement. This would present an odometer like color coded display. Would this fulfill your needs?

Hope this helps...
Gordon
 
T

tekari

Hi Gordon,

Thanks for the response. I think my question may have been worded a
little poorly too. There will only ever be a single digit in the Field
I am pulling from.

It would look like this:

Field1
1
2
1
3
3
1

Etc...

I have a usergroup that is very picky about how stuff is displayed. I
like your suggestion of sort of faking it, but it becomes increasingly
difficult to do that if that field expands. The reason they want it
color coded is to visually immediately identify which one of their
clients is in a "stat" status. Which I guess kind of makes sense...

~ Eric
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top