I've been thinking, and I've come up with a better workaround. You have to use the TextChanged event, but it would be way to expansive to loop all the options in the TextChanged event. So, fill a Dictionary with all your options (the value doesn't matter) and check Dictionary.HasKey(me.text) instead. It's a lot less expensive then looping all options on every TextChange event, but you can still check if a correct value has been entered. And it's not as ugly as using the LostFocus event, since you can update everything immediately.
Hope this helps, Maarten On 05/07/06, Maarten de Vries <[EMAIL PROTECTED]> wrote:
By setting ComboBox.AutoComplete=true the combobox will show a list of all the items starting with that, but you already noticed that I gues. You are right about the event not firing after the user clicked on an item in that list. You can work around this by putting the code in the LostFocus event. It's not nice though, and I'd file a bug report about this (I don't have an account there though, still have to make one. So someone else has to). On 05/07/06, Avery, Mike <[EMAIL PROTECTED]> wrote: > > I am trying to achieve the functionality of the VB combo box style > 1(simple > combo). In the VB app that I am trying to convert I can present the user > > with a list of the 400 or so names (mbrshp list). In VB as the user > types > the first few characters of the name the lower part of the list box > shows > names starting with these chars. When enough chars are typed in usually > only > 2 or 3 then the name appears in the lower list and user can select it by > clicking on it. The click is an event that I can use to load the info > for > that name/mbr. The closest I can find in RB is the combo box which will > not > display the list until the user starts to type. This is acceptable. But > when > the user selects one of the displayed names it does not invoke a change > event. If the user drops down the list and then selects a name then the > change event is triggered but this is not what I need. The user would > have > to scroll down through the whole list to find the name. Why doesn't the > change event (or some event) fire when the user selects from the list > provided when they start typing in first few chars of the name?? The > textchange event fires but it also fires for every char entered into the > editfield. I have investigated listboxes and popupmenus also but these > don't > produce the result I am trying to copy. > > Thanks in advance. > > Mike Avery
_______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives of this list here: <http://support.realsoftware.com/listarchives/lists.html>
