• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 251
  • Last Modified:

Make three colums in the listbox and populate them.

How do I create a list box with three columns ant populate all three colums at once???  I am using MS c++ .Net 2003
I tried creating a Clistbox and using a Cstring format to populate it but the text in each column is not alined right.
I used:
           CString txt;
           int value1, value2;

           txt.Format(%9s    %6ds    %7d ", txt1, value1,value2);
           clist.AddString(txt);

Sample output:

         J23.1            234         123
       J12.0               129          349
          J4                23          90

0
lcrogers
Asked:
lcrogers
1 Solution
 
AlexFMCommented:
You need listview control for this. See CListView class.
If you want to do this with list control, you need to select proportional font like Courier New in the dialog.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now