Change AutoComplete to "full text" search?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Spam Catcher

    Change AutoComplete to "full text" search?

    Is it possible to change the autocomplete behaviour to search for the word
    instead of just checking for the prefix?

    For example, if I have the following items:

    Big Mac
    Quarter Pounder
    Cheeseburger

    and someone types: Pounder, it should display "Quarter Pounder"?

    Thanks!

    --
    spamhoneypot@ro gers.com (Do not e-mail)
  • kimiraikkonen

    #2
    Re: Change AutoComplete to "full text" search?

    On Apr 4, 2:20 pm, Spam Catcher <spamhoney...@r ogers.comwrote:
    Is it possible to change the autocomplete behaviour to search for the word
    instead of just checking for the prefix?
    >
    For example, if I have the following items:
    >
    Big Mac
    Quarter Pounder
    Cheeseburger
    >
    and someone types: Pounder, it should display "Quarter Pounder"?
    >
    Thanks!
    >
    --
    spamhoney...@ro gers.com (Do not e-mail)
    For instance, try this:

    Private Sub TextBox1_TextCh anged(ByVal sender As System.Object, ByVal
    e As System.EventArg s) Handles TextBox1.TextCh anged
    If TextBox1.Text = "Pounder" Then
    TextBox1.Text = "Quarter Pounder"
    End If
    End Sub

    Comment

    • Spam Catcher

      #3
      Re: Change AutoComplete to &quot;full text&quot; search?

      kimiraikkonen <kimiraikkonen8 5@gmail.comwrot e in news:81162e90-2bcd-4d62-
      8773-54fe107c421c@b5 g2000pri.google groups.com:
      For instance, try this:
      >
      Private Sub TextBox1_TextCh anged(ByVal sender As System.Object, ByVal
      e As System.EventArg s) Handles TextBox1.TextCh anged
      If TextBox1.Text = "Pounder" Then
      TextBox1.Text = "Quarter Pounder"
      End If
      End Sub
      >
      How is that going to help me in an autocomplete situation?

      --
      spamhoneypot@ro gers.com (Do not e-mail)

      Comment

      • kimiraikkonen

        #4
        Re: Change AutoComplete to &quot;full text&quot; search?

        On Apr 4, 7:26 pm, Spam Catcher <spamhoney...@r ogers.comwrote:
        kimiraikkonen <kimiraikkone.. .@gmail.comwrot e in news:81162e90-2bcd-4d62-
        8773-54fe107c4...@b5 g2000pri.google groups.com:
        >
        For instance, try this:
        >
        Private Sub TextBox1_TextCh anged(ByVal sender As System.Object, ByVal
        e As System.EventArg s) Handles TextBox1.TextCh anged
        If TextBox1.Text = "Pounder" Then
        TextBox1.Text = "Quarter Pounder"
        End If
        End Sub
        >
        How is that going to help me in an autocomplete situation?
        >
        --
        spamhoney...@ro gers.com (Do not e-mail)
        I know it's not directly related to AutoComplete property but this can
        give you an urgent solution that makes text field as you wish if typer
        writes "Pounder" then textbox becomes "Ouarter Pounder" because of
        textbox's text_changed event, i hope you tried it.

        Comment

        • Spam Catcher

          #5
          Re: Change AutoComplete to &quot;full text&quot; search?

          kimiraikkonen <kimiraikkonen8 5@gmail.comwrot e in news:0ecc162b-f2b4-4740-
          b7dd-8eff2a0bb5c3@p3 9g2000prm.googl egroups.com:
          I know it's not directly related to AutoComplete property but this can
          give you an urgent solution that makes text field as you wish if typer
          writes "Pounder" then textbox becomes "Ouarter Pounder" because of
          textbox's text_changed event, i hope you tried it.
          Unfortunately its not what I'm really looking for - I would like to have
          the autocomplete list populated with suggestions like what Google Suggests
          does.

          If I only handle the TextChange event ... it'll be too much of a kudlge to
          be rewriting the user's input on the fly? I rather be able to display the
          suggestions in the autocomplete portion of the control.

          But, thanks for the suggestion!

          --
          spamhoneypot@ro gers.com (Do not e-mail)

          Comment

          • Lloyd Sheen

            #6
            Re: Change AutoComplete to &quot;full text&quot; search?


            "Spam Catcher" <spamhoneypot@r ogers.comwrote in message
            news:Xns9A776AC 11699Ausenethon eypotrogers@127 .0.0.1...
            kimiraikkonen <kimiraikkonen8 5@gmail.comwrot e in
            news:0ecc162b-f2b4-4740-
            b7dd-8eff2a0bb5c3@p3 9g2000prm.googl egroups.com:
            >
            >I know it's not directly related to AutoComplete property but this can
            >give you an urgent solution that makes text field as you wish if typer
            >writes "Pounder" then textbox becomes "Ouarter Pounder" because of
            >textbox's text_changed event, i hope you tried it.
            >
            Unfortunately its not what I'm really looking for - I would like to have
            the autocomplete list populated with suggestions like what Google Suggests
            does.
            >
            If I only handle the TextChange event ... it'll be too much of a kudlge to
            be rewriting the user's input on the fly? I rather be able to display the
            suggestions in the autocomplete portion of the control.
            >
            But, thanks for the suggestion!
            >
            --
            spamhoneypot@ro gers.com (Do not e-mail)

            Textbox has its own Autocomplete functionallity.

            As an example:

            Me.TextBox1.Aut oCompleteCustom Source.AddRange (New String() {"One", "Two",
            "Three"})
            Me.TextBox1.Aut oCompleteMode = System.Windows. Forms.AutoCompl eteMode.Suggest
            Me.TextBox1.Aut oCompleteSource =
            System.Windows. Forms.AutoCompl eteSource.Custo mSource

            The AutoCompleteCus tomSource can be populated in pretty much any way you
            want as long as it is an array of strings. Get it from database or where
            ever.

            Hope this is what you are looking for
            Lloyd Sheen

            Comment

            • Spam Catcher

              #7
              Re: Change AutoComplete to &quot;full text&quot; search?

              "Lloyd Sheen" <a@b.cwrote in
              news:OOj9oAzlIH A.3940@TK2MSFTN GP05.phx.gbl:
              Textbox has its own Autocomplete functionallity.
              >
              As an example:
              >
              Me.TextBox1.Aut oCompleteCustom Source.AddRange (New String() {"One",
              "Two", "Three"})
              Me.TextBox1.Aut oCompleteMode =
              System.Windows. Forms.AutoCompl eteMode.Suggest
              Me.TextBox1.Aut oCompleteSource =
              System.Windows. Forms.AutoCompl eteSource.Custo mSource
              >
              The AutoCompleteCus tomSource can be populated in pretty much any way
              you want as long as it is an array of strings. Get it from database
              or where ever.
              >
              Hope this is what you are looking for
              Yes, I know - but AutoComplete only search the PREFIX of the entries.

              As you see in my example, if you populate the autocomplete source with:

              Big Mac
              Quarter Pounder
              Cheeseburger

              and someone types in Pounder... it won't display Quarter Pounder as a
              suggestion...

              That's my problem - not how to populate the autocomplete datasource.

              I want to override/rewire the AutoComplete functionality in Winform
              Controls - if someone can point me in the right direction, that'll be
              great!

              Thanks.

              --
              spamhoneypot@ro gers.com (Do not e-mail)

              Comment

              • Spam Catcher

                #8
                Re: Change AutoComplete to &quot;full text&quot; search?

                "Lloyd Sheen" <a@b.cwrote in
                news:uEQpeA1lIH A.1052@TK2MSFTN GP05.phx.gbl:
                >
                "Lloyd Sheen" <a@b.cwrote in message
                news:%23iy39B0l IHA.1204@TK2MSF TNGP03.phx.gbl. ..
                >>
                >"Spam Catcher" <spamhoneypot@r ogers.comwrote in message
                >news:Xns9A7781 C43C004usenetho neypotrogers@12 7.0.0.1...
                >>"Lloyd Sheen" <a@b.cwrote in
                >>news:OOj9oAzl IHA.3940@TK2MSF TNGP05.phx.gbl:
                >>>
                >>>Textbox has its own Autocomplete functionallity.
                >>>>
                >>>As an example:
                >>>>
                >>>Me.TextBox1. AutoCompleteCus tomSource.AddRa nge(New String() {"One",
                >>>"Two", "Three"})
                >>>Me.TextBox1. AutoCompleteMod e =
                >>>System.Windo ws.Forms.AutoCo mpleteMode.Sugg est
                >>>Me.TextBox1. AutoCompleteSou rce =
                >>>System.Windo ws.Forms.AutoCo mpleteSource.Cu stomSource
                >>>>
                >>>The AutoCompleteCus tomSource can be populated in pretty much any
                >>>way you want as long as it is an array of strings. Get it from
                >>>database or where ever.
                >>>>
                >>>Hope this is what you are looking for
                >>>
                >>Yes, I know - but AutoComplete only search the PREFIX of the
                >>entries.
                >>>
                >>As you see in my example, if you populate the autocomplete source
                >>with:
                >>>
                >>Big Mac
                >>Quarter Pounder
                >>Cheeseburge r
                >>>
                >>and someone types in Pounder... it won't display Quarter Pounder as
                >>a suggestion...
                >>>
                >>That's my problem - not how to populate the autocomplete datasource.
                >>>
                >>I want to override/rewire the AutoComplete functionality in Winform
                >>Controls - if someone can point me in the right direction, that'll
                >>be great!
                >>>
                >>Thanks.
                >>>
                >>--
                >>spamhoneypot@ro gers.com (Do not e-mail)
                >>
                >>
                >Ok try this.

                Hmmm... Intersting, I'll give it a try.

                Thanks!


                --
                spamhoneypot@ro gers.com (Do not e-mail)

                Comment

                Working...