Thread: multi-column list box item order

  1. #1
    Registered User
    Join Date
    Feb 2006
    Posts
    7

    multi-column list box item order

    greetings,

    i've been trying to figure out how to set the item order of my multi-column list box from top-to-bottom to left-to-right. in other words:

    item0 item1
    item2 item3

    instead of

    item0 item2
    item1 item3

    is this possible with the native list box (mvc6) or do i have to get a different control in some free codebase?

  2. #2
    Yes, my avatar is stolen anonytmouse's Avatar
    Join Date
    Dec 2002
    Posts
    2,544
    You need to use a list-view control. As you've discovered the listbox multi-column feature gives newspaper style columns and is generally considered obsolete in favour of the list-view.

  3. #3
    Registered User
    Join Date
    Feb 2006
    Posts
    7
    nice, thanks for the hint.

    by the way.. is there any way of selecting each subitem? not just the whole row or only the subitems in the first column. it seems there's no style for this?

  4. #4
    Yes, my avatar is stolen anonytmouse's Avatar
    Join Date
    Dec 2002
    Posts
    2,544
    Just don't use the LVS_EX_FULLROWSELECT style.
    Code:
    ListView_SetExtendedListViewStyle(hListView, LVS_EX_CHECKBOXES | LVS_EX_FULLROWSELECT | LVS_EX_HEADERDRAGDROP);

  5. #5
    Registered User
    Join Date
    Feb 2006
    Posts
    7
    yeah i tried this but then only the subitems from the 0th column can be selected, not the others.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Pleas take a look & give a critique
    By sh3rpa in forum C++ Programming
    Replies: 14
    Last Post: 10-19-2007, 10:01 PM
  2. Constructive Feed Back (Java Program)
    By xddxogm3 in forum Tech Board
    Replies: 12
    Last Post: 10-10-2004, 03:41 AM
  3. compiler build error
    By KristTlove in forum C++ Programming
    Replies: 2
    Last Post: 11-30-2003, 10:16 AM
  4. c++ program
    By a_a in forum C++ Programming
    Replies: 22
    Last Post: 06-02-2003, 07:46 PM
  5. Contest Results - May 27, 2002
    By ygfperson in forum A Brief History of Cprogramming.com
    Replies: 18
    Last Post: 06-18-2002, 01:27 PM