|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
ComboBoxHello I need to create a combobox and I need to be able to write the first 3
letters of the code and the combo goes to the first item that starts with those 3 letters. Now what I can do is when I press 1 letter the combo goes to the first record that starts with that letter. For example I have some codes: ABC1 ABC2 ABC3 ABD1 ABD2 if I press A it will go to the first "ABC1" but I need to press ABD and it will go to "ABD1". I had this control in VB 6.0 where I was able to write in the combobox. Thanks in advance Jennyfer Jennyfer Barco wrote:
Show quoteHide quote > Hello I need to create a combobox and I need to be able to write the first 3 Do a search for autocomplete combobox. There are lots of examples of > letters of the code and the combo goes to the first item that starts with > those 3 letters. Now what I can do is when I press 1 letter the combo goes > to the first record that starts with that letter. For example I have some > codes: > > ABC1 > ABC2 > ABC3 > ABD1 > ABD2 > > if I press A it will go to the first "ABC1" but I need to press ABD and it > will go to "ABD1". I had this control in VB 6.0 where I was able to write in > the combobox. > > Thanks in advance > Jennyfer > > implementing this. Chris Jennyfer,
I had found this example, place this code in the combobox's KeyPress event. If Char.IsControl(e.KeyChar) Then Return With Me.cboBox Dim ToFind As String = .Text.Substring(0, .SelectionStart) & e.KeyChar Dim Index As Integer = .FindStringExact(ToFind) If Index = -1 Then Index = .FindString(ToFind) If Index = -1 Then Return .SelectedIndex = Index .SelectionStart = ToFind.Length .SelectionLength = .Text.Length - .SelectionStart e.Handled = True End With
I finally did it-- hungarian notation
currentFocus how do you execute javascript after script is regsistered? Outlook.MaiIteml.Move: The RPC server is not available Can't View Form in Designer Visual Basic .NET 2005 Express Unhandled handled exception in Catch line Event order problem Getting an object Using Winsock / TCP Client how do I enable the scrollbars in my textbox |
|||||||||||||||||||||||