combobox

how to use a combobox?
[22 byte] By [georgeskada] at [2007-12-24]
# 1

your question isn't clear enough so I'm just going to take a guess.

to use a combobox, drag and drop it on the form in designer view. Once done, in code you can add items (or from the designer view, in the combobox properties...which ever you like):

Me.theComboBox.Items.Add("item")

of course replace "theComboBox" with the name of your combobox control.

You can also remove items:

Me.theComboBox.Items.Remove("item")

You can also implement different events (such as selectedindexchanged) to do particular things when a combobox raises an event, to which you may have implemented.

You can also get the item chosen:

Me.theComboBox.SelectedItem

or to get the text chosen:

Me.theComboBox.SelectedText

please post back, stating clearly what you would like to do with a combobox to better provide you an answer :-)

ahmedilyas at 2007-8-31 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 2

Combobox Class
http://msdn2.microsoft.com/en-us/library/system.windows.forms.combobox.aspx

Contains an Items Collections
http://msdn2.microsoft.com/en-us/library/system.windows.forms.combobox.items.aspx

With can have items added / removed and cleared.

http://msdn2.microsoft.com/en-us/library/system.windows.forms.combobox.objectcollection.aspx
These include add , remove, clear methods and many others which can be easily addressed. The items collections for the combobox works in a similar manner to those of many controls which include items collections.

An example using the combobox control
http://www.startvbdotnet.com/controls/combo.aspx

Best advice is to try it out and play with the control - provide more description about a specific problem which we can try and help you with rather than a very open ended how do I use the combobox question.

spotty at 2007-8-31 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 3
thank you very mutch
georgeskada at 2007-8-31 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 4
What about when Threading gets in the way?
randomblink at 2007-8-31 > top of Msdn Tech,Visual Basic,Visual Basic General...