Advertisement
6_2008-2009 String Manipulation #200882

AutoComplete Made EASY!

This small script simply and easly creates an AutoComplete affect for your ComboBox. VERY EFFECTIVE AND VERY EASY TO UNDERSTAND.

AI

Shrnutí AI: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Zdrojový kód
original-source
Private Sub ComboBox_KeyPress(KeyAscii As Integer)
Timer1.Enabled = True
End Sub
Private Sub Timer1_Timer()
On Error GoTo Oops
With ComboBox
Kounter = 0
For Kounter = 0 To .ListCount
If .Text = Left(.List(Kounter), Len(.Text)) Then
OldLength = Len(.Text)
.Text = .List(Kounter)
.SelStart = OldLength
.SelLength = Len(.Text) - OldLength
Timer1.Enabled = False
GoTo Oops
End If
Next Kounter
End With
Oops:
Timer1.Enabled = False
End Sub
Původní komentáře (3)
Obnoveno z Wayback Machine