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. Getting user input into a list control

Getting user input into a list control

Scheduled Pinned Locked Moved C / C++ / MFC
javaquestion
5 Posts 3 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.
  • T Offline
    T Offline
    theCPkid
    wrote on last edited by
    #1

    I want to get user input when a user clicks a item in list control. Is there any easier or better way to achieve this than to use an edit box, display it where user has clicked, then read the data from edit box and display it into list control? Thanks.

    the fruits of your success will be in direct ratio to the honesty and sincerity of your own efforts in keeping your own records, doing your own thinking and, reaching your own conclusions. ..surviving in autumn..in love with spring..

    R S 2 Replies Last reply
    0
    • T theCPkid

      I want to get user input when a user clicks a item in list control. Is there any easier or better way to achieve this than to use an edit box, display it where user has clicked, then read the data from edit box and display it into list control? Thanks.

      the fruits of your success will be in direct ratio to the honesty and sincerity of your own efforts in keeping your own records, doing your own thinking and, reaching your own conclusions. ..surviving in autumn..in love with spring..

      R Offline
      R Offline
      Rajesh R Subramanian
      wrote on last edited by
      #2

      I don't quite get your requirement. Can you explain?

      Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP

      T 1 Reply Last reply
      0
      • T theCPkid

        I want to get user input when a user clicks a item in list control. Is there any easier or better way to achieve this than to use an edit box, display it where user has clicked, then read the data from edit box and display it into list control? Thanks.

        the fruits of your success will be in direct ratio to the honesty and sincerity of your own efforts in keeping your own records, doing your own thinking and, reaching your own conclusions. ..surviving in autumn..in love with spring..

        S Offline
        S Offline
        Steen Krogsgaard
        wrote on last edited by
        #3

        Instead of using a list control, use a list-view control with LVS_EDITLABELS style set. See MSDN List-view control or LVS_EDITLABELS for details.

        Cheers Steen. "Are you gonna check your makeup when you're done whining?" John Simmons, 05/31/2006 "Of course, the next day it automatically updates, and your quick'n'dirty patches cause the new binaries to segfault all over your linoleum. If only you'd had the source..." Shog, 10/18/2006 "One day I realized that sadness is just another word for not enough coffee" Wally, 10/18/2006

        1 Reply Last reply
        0
        • R Rajesh R Subramanian

          I don't quite get your requirement. Can you explain?

          Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP

          T Offline
          T Offline
          theCPkid
          wrote on last edited by
          #4

          I am sorry for being ambiguous. I want to show 10 numbers to user and corresponsing to each number, I need a string from user. For this, I am using a list control inside a dialog box and in first column, 1-10 numbers will be placed in 10 rows and in second column, user will enter text corresponding to each number. Then I need to store all this data. My problems are - If I use list control, then the sub items(second column) does not appear to editable. Second, I am wondering whether xml is the right way to store this data or do I have other options? I expect the number of items to grow. Thanks for any inputs.

          the fruits of your success will be in direct ratio to the honesty and sincerity of your own efforts in keeping your own records, doing your own thinking and, reaching your own conclusions. ..surviving in autumn..in love with spring..

          R 1 Reply Last reply
          0
          • T theCPkid

            I am sorry for being ambiguous. I want to show 10 numbers to user and corresponsing to each number, I need a string from user. For this, I am using a list control inside a dialog box and in first column, 1-10 numbers will be placed in 10 rows and in second column, user will enter text corresponding to each number. Then I need to store all this data. My problems are - If I use list control, then the sub items(second column) does not appear to editable. Second, I am wondering whether xml is the right way to store this data or do I have other options? I expect the number of items to grow. Thanks for any inputs.

            the fruits of your success will be in direct ratio to the honesty and sincerity of your own efforts in keeping your own records, doing your own thinking and, reaching your own conclusions. ..surviving in autumn..in love with spring..

            R Offline
            R Offline
            Rajesh R Subramanian
            wrote on last edited by
            #5

            For in-place editing, Steen Krogsgaard has given you the idea.

            theCPkid wrote:

            Second, I am wondering whether xml is the right way to store this data or do I have other options?

            Well, that totally depends on your choice. You can put it in the registry as well. If it is in an XML or inf file, it becomes easily portable (if such a thing is desired).

            Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP

            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