Multi Column - CListBox or CListCntrl
Hi,
I want to display data in multi columns. Such as First Name in Column 1, Last Name In Column 2, in a list box of some sort. I thought the CListBox
could do this, But I am having trouble finding info about this. Do I have to use a ClistCtrl, I don't know much about CListCtrl. And could you give me some simple syntax to make 2 columns, and insert strings in each.
Thanks,
- Mark
Re: Multi Column - CListBox or CListCntrl
1) CListBox's multicolumn is a misnomer. What you get is a something like a wrappable column, it is not TRUE multicolumn.
2) You can to use either a) CListBox with tab stops or CListCtrl which is easier.
3) To insert a new row into a CListCtrl, use InsertItem(...). To set texts in sub columns, use SetItemText(...)
4) Make sure you make the control present itself in Report mode, as that is the mode where you will have REAL multiple columns
Sally