Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. combox question

combox question

Scheduled Pinned Locked Moved C / C++ / MFC
questionhelp
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    kevincwong
    wrote on last edited by
    #1

    Hi, I created a combobox with 50 state codes; it seems working okay. So, when user type 'N', 'Y'; it will highlight "NY". When user hits enter, it will put "NY" into the combobox. However, user can enter invalid code; such as 'N', 'W'. It ends up putting "NW" into the combobox. I probably can us OnChar ( ) to validate all the input. But, does any know a better way to handl it? Any help / suggestion would be appreciated! Thanks, Kevin

    B 1 Reply Last reply
    0
    • K kevincwong

      Hi, I created a combobox with 50 state codes; it seems working okay. So, when user type 'N', 'Y'; it will highlight "NY". When user hits enter, it will put "NY" into the combobox. However, user can enter invalid code; such as 'N', 'W'. It ends up putting "NW" into the combobox. I probably can us OnChar ( ) to validate all the input. But, does any know a better way to handl it? Any help / suggestion would be appreciated! Thanks, Kevin

      B Offline
      B Offline
      BadKarma
      wrote on last edited by
      #2

      You can set the style of the combobox to 'dropdown'-list. This will prevent the user to enter a word that doesn't exist already in the list Regards codito ergo sum

      K 1 Reply Last reply
      0
      • B BadKarma

        You can set the style of the combobox to 'dropdown'-list. This will prevent the user to enter a word that doesn't exist already in the list Regards codito ergo sum

        K Offline
        K Offline
        kevincwong
        wrote on last edited by
        #3

        Got it! Thanks! Kevin

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups