Question Combo Box ?

audio_uphoria

Active member
Joined
Jan 28, 2009
Messages
31
Programming Experience
Beginner
Hi, does anyone know of a good tutorial or can give me advice on using the combo boxes in vb? I just cant seem to get the hang out of it... Thanks.
 
Thanks, can I add color to text in a drop down menu? I have the slections load on the form_load. And I would like to add a color that correspondes with the word.

With cboShirtColor.Items
.Add("Black")
.Add("Red")
.Add("Yellow")
.Add("Orange")
.Add("Green")
.Add("Blue")
.Add("Navy")
End With
 
Thanks, can I add color to text in a drop down menu? I have the slections load on the form_load. And I would like to add a color that correspondes with the word.

With cboShirtColor.Items
.Add("Black")
.Add("Red")
.Add("Yellow")
.Add("Orange")
.Add("Green")
.Add("Blue")
.Add("Navy")
End With
You can but that's relatively advanced. It requires you to use GDI+ to draw the items yourself. If you're interested then read the documentation for the DrawMode property.
 
Oh, I'm nowhere near advance. Ok one more question. If I have a list of items in the items property for a drop down and I want to check to make sure the user entered a corresponding item in the editable area that matches the list how would I code that?
Right now I have state abbreviations in the list.
So would I do something like:
If cbostate.text does not equal "AK" orelse "AL" orelse etc.... then
messagebox.show ("Enter the correct state abbreviation")

Or is there an easier way? Thanks.
 
Back
Top