Combobox auto-selecting entries
Posted on 2001-07-02
i have a rather automated system set up for a current program i am constructing. one of the forms serves as somewhat of a property list (it can be thought of as similar to the property list used in the VB IDE). it is simply a flexgrid which allows for in-place editing, and depending on the type of data being entered, either a textbox, or combobox, or even another grid will appear.
the problem arises from the fact that there is certain data we must store which we offer a combobox list of suggested, or recommended, values, but that the user has the ability to override with their own custom value if they wish. using a combobox seems acceptable since it allows for selection from our list, plus, gives the user the ability to manually type in their own value (with style set to DropDown Combo). however, if they enter a value that starts with one of the values in the list, that list item is automatically selected and takes the place of their custom value as the combobox's text when the combobox drpos down. for example:
Private Sub Form_Load()
.Text = "3"
now if you run the program, "3" shows in the combobox, but once you dropdown, "34.56" becomes selected and shows as the new value. is there an elegant way around this? perhaps a property or API call I am not familiar with? changes in the UI will most likely not be allowed.
P.S. i will add points to this for a good solution - just looking for ideas first