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

list box colour

Status
Not open for further replies.

lpgagirl

Technical User
Feb 3, 2003
202
CA
I have a list box. When the user makes a selection it becomes black, is there a way to either remove the highlight colour or make it a different colour?

Jeannie
 
Look in your coding... probably in the after update event... that looks similiar to this...

Me!ControlName.BackColor = (a number)

This most likely is what is changing it to black.

Temporarily put a ' in front of this line of code to disable it..

Bill
 
The backcolor property refers to the entire box, not just the selected item. The only way I've found to change the selected items background color is to change the listbox background color. It seems that, with a white background, the highlited item will always be black. However, that changes when you change the listbox backcolor property. For instance, with a yellow background, the highlited background color is blue and with a blue background, the highlited background color is red.

Sorry I can't be of any more help.
 
Have you thought about creating a fake list box that is actually a sub form with conditional formatting?

This would give the appearance of a list box but would allow you to change the highlight by changing the background color of the text box when it gets focus.

HTH
Mike

[penguin] Dooobie...Doobie......Dooo

Beware the penguins
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top