locked
how to use google textbox RRS feed

  • Question

  • hello friends

     

    i have a question how  the textbox in www.google.com will retrive the the text which has been previously typed

     

    and how it finds the correct combination of text i mean while typing in www.google.com if already type means it will

     

    display a drop-down list like that how can i use the that kind of textbox it the vb.net form.

     

    pls tell me what is it and how it works

     

    Sunday, September 30, 2007 3:29 PM

Answers

  • Hi Jin,

     

    You are talking about the AutoComplete Feature of the TextBox control, which can record and show history text what you typed.

     

    1. As for web form, the TextBox control has only one relevant property called AutoCompleteType.

       Set it as None not Disabled, that's OK.

     

    2. As for windows form, the TextBox control has three relevant properties called

       AutoCompleteMode,  AutoCompleteSource, AutoCompleteCustomSource.

     

       Set them as below.

    •    AutoCompleteMode: Suggest
    •    AutoCompleteSource: CustomerSource
    •    Add TextBox1.Text to AutoCompleteCustomSource collection in TextBox1_Leave event.

       Private Sub TextBox1_Leave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.Leave

            TextBox1.AutoCompleteCustomSource.Add(TextBox1.Text)

       End Sub

     

    References:

    1. Check this blog article, which talks about AutoComplete feature of TextBox and ComboBox. It may be helpful to you.

     

    2. URLComboBox : A window forms control for displaying URL's

    Some features of the control:

    • Autocomplete support like that in IE.  

    • Automatic management of MRU list.

     

    Regards,

    Martin

    Tuesday, October 2, 2007 1:23 AM

All replies

  • Hi Jin,

     

    You are talking about the AutoComplete Feature of the TextBox control, which can record and show history text what you typed.

     

    1. As for web form, the TextBox control has only one relevant property called AutoCompleteType.

       Set it as None not Disabled, that's OK.

     

    2. As for windows form, the TextBox control has three relevant properties called

       AutoCompleteMode,  AutoCompleteSource, AutoCompleteCustomSource.

     

       Set them as below.

    •    AutoCompleteMode: Suggest
    •    AutoCompleteSource: CustomerSource
    •    Add TextBox1.Text to AutoCompleteCustomSource collection in TextBox1_Leave event.

       Private Sub TextBox1_Leave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.Leave

            TextBox1.AutoCompleteCustomSource.Add(TextBox1.Text)

       End Sub

     

    References:

    1. Check this blog article, which talks about AutoComplete feature of TextBox and ComboBox. It may be helpful to you.

     

    2. URLComboBox : A window forms control for displaying URL's

    Some features of the control:

    • Autocomplete support like that in IE.  

    • Automatic management of MRU list.

     

    Regards,

    Martin

    Tuesday, October 2, 2007 1:23 AM
  •  

    hello friends

     

    may i known how to add suggestion in the textbox

     

    like google toolbar

    Tuesday, October 2, 2007 8:55 AM
  • Redirect it to your new thread: add suggestion to textbox

    Thursday, October 11, 2007 5:11 AM
  •  

    Thursday, October 11, 2007 5:17 AM