Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multi-column listbox

Status
Not open for further replies.

timmay3141

Programmer
Dec 3, 2002
468
US
I'm trying to use a list box with multiple columns. If you have an app, bring up the ClassWizard, and go to the Member Variables tab, you'll see what I basically want. It's got a listbox with "Control IDs" on the left, "Type" in the middle, "Member" on the right. I tried using list controls with the "Report" style, but there was some stuff I didn't like about it. I checked the multi-column tab on the resource editor, but I still couldn't figure out how to add multiple columns, and the MSDN documentation didn't help much. How can I use multiple columns?
 
Now, what is wrong with list ctrls, eh?

The multicolumn list box is kind of crude, but if you insist...check the CListBox::SetColumnWidth method


/Per
Nerdy signatures are as lame as the inconsistent stardates of STTNG.
 
I decided to use list box because list controls in a Report style select only the first element when you click them, rather than selecting the entire row as the the box does in the ClassView. I found this to be very annoying; if there is a way to fix this I'd use list controls instead. Is there?
 
Code:
CListCtrl::SetExtendedStyle( LVS_EX_FULLROWSELECT);

-pete
 
Yep that's it, thanks. I look for this stuff in the documentation but I never seem to find it...I'll try looking harder next time. Sorry to bother you with a problem I could have solved on my own.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top