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. Dynamically adding items to a combo box

Dynamically adding items to a combo box

Scheduled Pinned Locked Moved C / C++ / MFC
4 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.
  • L Offline
    L Offline
    lbc
    wrote on last edited by
    #1

    Hello everybody I have a normal combobox in a dialog, and besides the initial items loaded from a file I want the item shown in the editbox area of the combobox to be automatically updated when the user writes something inside it. I also wuld like this string to be "stored", so that next time he/she pulls down the combobox this string is still there. I actually tried to implement notification handlers for: ON_CBN_SELENDOK , ON_CBN_EDITCHANGE and ON_CBN_EDITUPDATE but I couldn't exactly get what i need. Any info/tip will be greatly appreciated thank you best regards

    V 1 Reply Last reply
    0
    • L lbc

      Hello everybody I have a normal combobox in a dialog, and besides the initial items loaded from a file I want the item shown in the editbox area of the combobox to be automatically updated when the user writes something inside it. I also wuld like this string to be "stored", so that next time he/she pulls down the combobox this string is still there. I actually tried to implement notification handlers for: ON_CBN_SELENDOK , ON_CBN_EDITCHANGE and ON_CBN_EDITUPDATE but I couldn't exactly get what i need. Any info/tip will be greatly appreciated thank you best regards

      V Offline
      V Offline
      valikac
      wrote on last edited by
      #2

      You want the program to add new items to the combobox as the user types in text? For example: EditBox: January ComboBox: J Ja Jan Janu Janua Januar January Is that what you mean? Window should send ON_CBN_EDITCHANGE as the user makes changes to the editbox. Add new items accordingly. Kuphryn

      L 1 Reply Last reply
      0
      • V valikac

        You want the program to add new items to the combobox as the user types in text? For example: EditBox: January ComboBox: J Ja Jan Janu Janua Januar January Is that what you mean? Window should send ON_CBN_EDITCHANGE as the user makes changes to the editbox. Add new items accordingly. Kuphryn

        L Offline
        L Offline
        lbc
        wrote on last edited by
        #3

        Hello, thank you with reference to your example i'd wish adding just only 'January', I mean when the user has entered a new complete item thanks again for any tip best regards

        V 1 Reply Last reply
        0
        • L lbc

          Hello, thank you with reference to your example i'd wish adding just only 'January', I mean when the user has entered a new complete item thanks again for any tip best regards

          V Offline
          V Offline
          valikac
          wrote on last edited by
          #4

          One solution is to process the data in real-time. Thus each time the user makes a change, you analyze the text and process it accordingly. Kuphryn

          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