Click here to Skip to main content
15,891,431 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
As per the above... basically what I want is like an old-fashioned ListBox, just with the spiffy images from an image list. Can I force a Listview to limit items to just one column without having to resort to 'Details' view?
Posted
Updated 13-May-10 14:48pm
v2

1 solution

Only if you control the listview's size and the length of the contents of the listview item texts.

The size of the listview and the length of the items will determine if more than one column is shown.

You might be able to find code that can restrict the columns in "list" view by subclassing it, but it seems like a lot of trouble to go through for a very small detail.

I don't understand: What's wrong with "details" view since you are so set against it?

You can get it to look precisely like the "list" view if you hide the column headers...

If you are dead set against the "details" view, there is another possibility:

Go with the listbox instead and try to Google some code that lets you add images/icons.

You could for instance have a look at this:

Extending the ListBox to show more complex items[^]

Good luck!
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900