我怎样才能创建一个VB6组合框自动完成? [英] How can I create an autocomplete ComboBox in VB6?

查看:89
本文介绍了我怎样才能创建一个VB6组合框自动完成?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有可能使用VB6在默认的ComboBox控件,使其智能组合框?
我们假设值已经填充的组合框。例如:

Is it possible to use the default ComboBox control under VB6 to make it a smart ComboBox? We suppose that the values are already populated in the ComboBox. For example:

New Delhi
New World
New York

我们需要向组合框的默认事件中的一个反应,所以当例如用户在ComboBox中写道:'N'的值将是'N'开头的第一个值。在我们的情况下,它新德里,然后直到他们写出确切的词或他写的东西不同的用户可以继续输入。
这种技术在Web应用程序中非常使用(例如在谷歌当你把第一个字,你会得到一个包含了一个建议DROP掉下拉列表)。
但如何做,在VB6: - (

We need the ComboBox to respond to one of the default events, so when for example the user writes 'N' the value in the ComboBox will be the first Value starting by 'N'. In our case it's New Delhi and then the user can continue typing till they write the exact word or he writes something different. This technique is very used in web Application (for example in Google when you put the first word you will get a droped down list containing the suggestions). But how to do that in VB6 :-(

在情况下,其不可能的,我们如何能保持组合框DROP掉了下来,当在组合框中改变文本和第一个元素的组合框对应的第一个字由用户输入的值开始的数值变化?

In case its not possible, how can we keep the ComboBox droped down, the values changes when the text in the comboBox change and the first element in the ComboBox correspond to the first word starting by the value entered by the user?

非常感谢。

推荐答案

您可能也想看看<一个href=\"http://www.vbaccelerator.com/home/VB/$c$c/Controls/Combo_and_List_Boxes/ComboBoxEx/article.asp\"相对=nofollow>从vbAccelerator.com,这种控制它支持自动完成。该vbAccelerator code一般是高品质。当然,你要介绍一个相当依赖到code无论你使用一个第三方控件。

You might also want to look at this control from vbAccelerator.com, which supports auto-completion. The vbAccelerator code is usually high quality. Of course you're introducing quite a dependency into your code whenever you use a third-party control.

这篇关于我怎样才能创建一个VB6组合框自动完成?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆