How set ComboBox to auto-complete?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ronald S. Cook

    How set ComboBox to auto-complete?

    In my Windows forms app, I want my ComboBoxes to let the user begin to type
    values and it start to populate (if a match is found). But, I don't want
    the user to enter a value that is not in the list.

    What properties do I need to set to what to make this happen, please?

    I think it the involved properties are:

    DropDownStyle
    AutoCompleteMod e
    AutoCompleteSou rce

    .... but there are lots of different settings.

    thanks


  • zacks@construction-imaging.com

    #2
    Re: How set ComboBox to auto-complete?

    On Feb 28, 12:50 pm, "Ronald S. Cook" <rc...@westinis .comwrote:
    In my Windows forms app, I want my ComboBoxes to let the user begin to type
    values and it start to populate (if a match is found).  But, I don't want
    the user to enter a value that is not in the list.
    >
    What properties do I need to set to what to make this happen, please?
    >
    I think it the involved properties are:
    >
    DropDownStyle
    AutoCompleteMod e
    AutoCompleteSou rce
    >
    ... but there are lots of different settings.
    >
    thanks
    DropDownStyle = DropDownList

    Comment

    • Ronald S. Cook

      #3
      Re: How set ComboBox to auto-complete?

      That does only the first letter.


      <zacks@construc tion-imaging.comwrot e in message
      news:e6b0228a-cdb8-43ce-8df3-fcb3cb4de849@h2 5g2000hsf.googl egroups.com...
      On Feb 28, 12:50 pm, "Ronald S. Cook" <rc...@westinis .comwrote:
      In my Windows forms app, I want my ComboBoxes to let the user begin to
      type
      values and it start to populate (if a match is found). But, I don't want
      the user to enter a value that is not in the list.
      >
      What properties do I need to set to what to make this happen, please?
      >
      I think it the involved properties are:
      >
      DropDownStyle
      AutoCompleteMod e
      AutoCompleteSou rce
      >
      ... but there are lots of different settings.
      >
      thanks
      DropDownStyle = DropDownList

      Comment

      • zacks@construction-imaging.com

        #4
        Re: How set ComboBox to auto-complete?

        On Feb 28, 2:40 pm, "Ronald S. Cook" <rc...@westinis .comwrote:
        That does only the first letter.
        Correct. As far as I am aware, that's all .NET ComboBox does for you.
        If you want true autocomplete, then you are going to have to write
        some custom code in the controls TextChanged event. But I wouldn't re-
        invent the wheel, do a Google search, I'm sure you will fine some code
        out there that does it. I personally have never looked for a .NET
        version, but we use a VB6 version where I work.
        >
        <za...@construc tion-imaging.comwrot e in message
        >
        news:e6b0228a-cdb8-43ce-8df3-fcb3cb4de849@h2 5g2000hsf.googl egroups.com...
        On Feb 28, 12:50 pm, "Ronald S. Cook" <rc...@westinis .comwrote:
        >
        >
        >
        >
        >
        In my Windows forms app, I want my ComboBoxes to let the user begin to
        type
        values and it start to populate (if a match is found). But, I don't want
        the user to enter a value that is not in the list.
        >
        What properties do I need to set to what to make this happen, please?
        >
        I think it the involved properties are:
        >
        DropDownStyle
        AutoCompleteMod e
        AutoCompleteSou rce
        >
        ... but there are lots of different settings.
        >
        thanks
        >
        DropDownStyle = DropDownList

        Comment

        Working...