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. Multiple column ListBox

Multiple column ListBox

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

    Hi All, I want to display some data in multiple column ListBox. In 1st column I want to display Attribute-Name and in 2nd column Attribute-Value. What I need to Do? I’ve a dialog-box created, in which I added a ListBox Control. Any suggestions are welcome Thanks, -- Sumit

    C J 2 Replies Last reply
    0
    • L Lost User

      Hi All, I want to display some data in multiple column ListBox. In 1st column I want to display Attribute-Name and in 2nd column Attribute-Value. What I need to Do? I’ve a dialog-box created, in which I added a ListBox Control. Any suggestions are welcome Thanks, -- Sumit

      C Offline
      C Offline
      Carlos Antollini
      wrote on last edited by
      #2

      You need to Use a List View.... Best Regards.... Carlos Antollini. Sonork ID 100.10529 cantollini

      1 Reply Last reply
      0
      • L Lost User

        Hi All, I want to display some data in multiple column ListBox. In 1st column I want to display Attribute-Name and in 2nd column Attribute-Value. What I need to Do? I’ve a dialog-box created, in which I added a ListBox Control. Any suggestions are welcome Thanks, -- Sumit

        J Offline
        J Offline
        Joaquin M Lopez Munoz
        wrote on last edited by
        #3

        Altough I agree with Carlos in that you're better off using a list view control, still there's a feature of list boxes that could suit your needs, namely tabstops, which work pretty much the same as user-defined tabstops in a word processor. For instance, if your first attribute name was "Age" and its corresponding value was "30", you would have to write something like

        int tabs[]={60,60};
        m_listbox.SetTabStops(2,tabs); //set tabstops positions
        m_listbox.AddString("Age\t30"); //different "columns" separated by "\t"

        Hope this helps. Joaquín M López Muñoz Telefónica, Investigación y Desarrollo

        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