Click here to Skip to main content
16,016,643 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Im working on this list view that i added messages to with a image right before it that is stored in an image list. below is how i add the text and the image to the listview:

ListView1.Items.Add("This is a test", 0)

the above code works fine but when i add more then 5 items i start getting the horizontal scroll bar when i want these items to get the vertical scroll bar. If i use just text the details view works just fine but when i try to use the above code in details view it adds a blank line with no text or image. if someone could help and point me in the right direction for this that would be great.
Posted
Updated 8-Jun-12 9:01am
v3
Comments
Sergey Alexandrovich Kryukov 8-Jun-12 14:08pm    
Tag it: Forms? ASP.NET? Something else?
--SA
Zachary.shupp 8-Jun-12 14:48pm    
added the tag for winforms sorry.
MuhtarQong 8-Jun-12 14:57pm    
Please make a spelling check and make the question more clear.

I figured out my issue. I had to add a column and everything started showing up in the dtails view.
 
Share this answer
 
It appears as though you didn't account for the width of the vertical scroll bar. You get the horizontal bar because the displayable area of your listview is being cut down by the vertical scroll bar. Make the control wider.
 
Share this answer
 

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