473,387 Members | 1,486 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

ComboBox Color Change on Enter

Is there a way to have the actual listed items of a ComboBox have a
different background color from the base background color - e.g. all
the textboxes and combos have tan as their background color, but upon
'dropping-down' the Combo-box's items have light-blue as their
background color, then after choosing an item the result reverts back
to the original tan. Is this possible? Thanks!

Aug 17 '07 #1
2 5392
On Aug 17, 7:53 am, slinky <campbellbrian2...@yahoo.comwrote:
Is there a way to have the actual listed items of a ComboBox have a
different background color from the base background color - e.g. all
the textboxes and combos have tan as their background color, but upon
'dropping-down' the Combo-box's items have light-blue as their
background color, then after choosing an item the result reverts back
to the original tan. Is this possible? Thanks!
The only way I know to do this requires making your own combo box from
scratch, using labels and a command button embedded with your own
"down arrow" .bmp. It can be done, but it takes a great deal of
programming.

Aug 17 '07 #2
Ben
On Aug 17, 5:53 am, slinky <campbellbrian2...@yahoo.comwrote:
Is there a way to have the actual listed items of a ComboBox have a
different background color from the base background color - e.g. all
the textboxes and combos have tan as their background color, but upon
'dropping-down' the Combo-box's items have light-blue as their
background color, then after choosing an item the result reverts back
to the original tan. Is this possible? Thanks!
I think you could probably complete most of what you are after using
the Got Focus and Lost Focus events.

When the combobox gets the focus change the background color, when it
loses it change it back.

You could also tune the display a bit with onenter or afterupdate
events.

Aug 17 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Nicolae Fieraru | last post by:
Hi All, I am trying to change the rowsource of a combobox when I click on it. I played with many events, associated with the form and the combobox, but still haven't figured out what is the way...
2
by: pei_world | last post by:
I want to implement a key hit with enter to dropdown a combobox that is in the datagrid. in this case I need to override its original behaviours. I found some codes from the web. Does anyone know...
9
by: Li Pang | last post by:
I use a combobox control to populate the data. I want to prevent to change data (freeze the data in the filed). The only solution I have is to set Enabled property to "False", but it gray out the...
3
by: Mark P | last post by:
How to solve this? 1. Place a ComboBox in a form 2. On the ComboBox Properties window change the Items to hold: a b c d
19
by: Bernie Yaeger | last post by:
Everyone misses the point on this - what we need is a combobox autocomplete that is a dropdownlist only. When in dropdown mode, you can enter text - making that autocomplete is trivial. But when...
30
by: dbuchanan | last post by:
ComboBox databindng Problem == How the ComboBox is setup and used: My comboBox is populated by a lookup table. The ValueMember is the lookup table's Id and the DisplayMember is the text from a...
4
by: jon f kaminsky | last post by:
Hi- I've seen this problem discussed a jillion times but I cannot seem to implement any advice that makes it work. I am porting a large project from VB6 to .NET. The issue is using the combo box...
5
by: Gil | last post by:
Is there a way to tell if a combbox is in dropdown mode. I tried and if statement combobox.dropdown = true but i get an error. dropwndown function doesnt store if its true or false what i am...
1
by: amber | last post by:
I'm having an issue with a combobox that is making no sense to me at all. I have a form with several comboboxes/textboxes. The values in these boxes are based on a datarowview, which is based on...
6
by: tbrown | last post by:
I have a combobox with items like this: {one,two,three}. The selected index is 0, so "one" appears in the combobox text. When the user drops down the list, and selects "two", for example, I...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.