Google的TextBox匹配搜索词组 [英] Google's TextBox match Search Phrases

查看:161
本文介绍了Google的TextBox匹配搜索词组的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在google文本框中键入内容时,一些相关的短语会在下拉列表中显示在文本框中.它是如何形成和工作的.我希望将该功能添加到我的搜索窗口表单应用程序"中.
这是否可能

as i type to google Text Box some of the relvent phrase appear in the textbox as a drop down. How does it form and work. i want that feature into my search window Form Application.
Is this possible

推荐答案

尝试以下操作:
Try this:
public Form1()
{
    InitializeComponent();
    yourTextBox.AutoCompleteMode = AutoCompleteMode.Suggest;
    yourTextBox.AutoCompleteSource = AutoCompleteSource.CustomSource;
    AutoCompleteStringCollection source = new AutoCompleteStringCollection();
    source.AddRange(new string[]
                    {
                        "Item1",
                        "Item2",
                        "Item3"
                        // add more items if you want
                     });
    yourTextBox.AutoCompleteCustomSource = source;
}


希望对您有所帮助.


Hope this helps.


您好,穆罕默德,请尝试使用此链接

http://msdn.microsoft.com/en-us/library/system.windows.forms.textbox.autocompletemode.aspx [ ^ ]

谢谢
Ganesh
Hi Muhamad, try this link

http://msdn.microsoft.com/en-us/library/system.windows.forms.textbox.autocompletemode.aspx[^]

Thanks
Ganesh


这篇关于Google的TextBox匹配搜索词组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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