DropDown combo box

shankar_it

Freshman
Joined
Jul 6, 2005
Messages
46
Is there a way to automaticlly start showing all or some of the list of words in the combobox when i just start typing in some characters ie the way it behaves when i click the small arrow mark in combobox and then start typing the words.My aim is to just avoid the user to click the arrowmark and just start showing the user the list when he starts typing in the box.
 
If you are using .Net 2005 you can set the AutoCompleteMode to "Suggest" and AutoCompleteSource to "ListItems".
 
I'd imagine you'd have to-do it manually. Store the full list in an array of some kind, then on each key press by the user add the relevant items from the array to the list.
 
I am not sure if the autocomplete is the right solution.

cags i already have loaded the collections in the combo box.all i want it to know the event which i can use to show the listings in the drop down just when we start typing some thing in the dropdown like it happens when you click the arrow mark in the drop down list.



Cags said:
I'd imagine you'd have to-do it manually. Store the full list in an array of some kind, then on each key press by the user add the relevant items from the array to the list.
 
Like on Keypress or ontextchange even of the combo box i am lookiing to expand the dropdown box


shankar_it said:
I am not sure if the autocomplete is the right solution.

cags i already have loaded the collections in the combo box.all i want it to know the event which i can use to show the listings in the drop down just when we start typing some thing in the dropdown like it happens when you click the arrow mark in the drop down list.
 
try this and see if this is what you are looking for

Code:
  Private Sub ComboBox1_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles ComboBox1.KeyPress
       Me.ComboBox1.DroppedDown = True
End Sub

I also have the "Dropdownstyle" properties set to "DropDown"
 
yes thankyou techman.

techmanbd said:
try this and see if this is what you are looking for

Code:
  Private Sub ComboBox1_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles ComboBox1.KeyPress
       Me.ComboBox1.DroppedDown = True
End Sub

I also have the "Dropdownstyle" properties set to "DropDown"
 
I have one more question is there any kind of outof focus event in combobox.

My aim is to automatically fire some events when user goes out of focus of combobox

shankar_it said:
yes thankyou techman.
 
Back
Top