hello.
i need help with combobox in vb.net.
i try to add several columns in the combo,so i want when i select one item in the combo (this item is composed from 3 words for example),so i want the text in the combobox not to be composed from these 3 words but from one of these 3 word.
this is what i need.
so to test the combobox,i tried when i select an item in the combobox (what ever this item) to set manually the text in the combo and that is the impossible,so i noticed that when i select an item in the combo box ,it's been selected in the combo so it's impossible to change the selection so i tried :combobox1.SelectionLength = -1 but it throw an exception and i fail.and i tried everything i can and no result.
so i know the key is to unselect the selection in the combo,then set manually the text,it's like to click in the textarea of the combo to unselect the item selected.
so i need your experience.
thank you for help.
cocoll
0
Junior Poster in Training
Recommended Answers
Jump to PostThis is what you need, it's a multi-column combobox.
http://www.vbaccelerator.com/home/net/code/controls/ListBox_and_ComboBox/Icon_ComboBox/article.aspAnd for your problem with unselecting a selected item, use
combobox1.SelectedIndex = -1
.
Jump to PostUnfortunatily, the standard combobox does not support true multiple columns. You have to go custom for that.
There is one solution that I found a while back ago, when I was researching readonly comboboxes.
It involves one combobox and one textbox.
Put the textbox on top of the combobox, …
All 5 Replies
Oxiegen
88
Basically an Occasional Poster
Featured Poster
cocoll
0
Junior Poster in Training
Oxiegen
88
Basically an Occasional Poster
Featured Poster
cocoll
0
Junior Poster in Training
Oxiegen
88
Basically an Occasional Poster
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.