RE: Too Many ListView Columns
- From: jetan@xxxxxxxxxxxxxxxxxxxx ("Jeffrey Tan[MSFT]")
- Date: Wed, 26 Sep 2007 03:30:04 GMT
Hi Greg,
ListView is a more advanced control than ListBox. A key difference is the
ListView has four different display mode. This can be set in the
ListView.View property in designer. The default value is View.LargeIcon,
which displays the items from left to right in the same row and will
display in the second row when the first row is full. I think this is the
behavior you see in your program. The detailed behavior of different
display mode is documented below:
http://msdn2.microsoft.com/en-us/library/system.windows.forms.view.aspx
To display the ListView like the ListBox, you should change the
ListView.View property to View.Details. This will show each item in a row.
Note: View.Details enables the columns for the subitems, so you should also
add several columns in ListView.Columns property in designer. Then, your
items and subitems will map to each column you added in the
ListView.Columns property.
For a sample regarding using ListView in details mode, please refer to the
article below:
"Working with ListView"
http://www.ondotnet.com/pub/a/dotnet/2002/10/28/listview.html
Hope this helps.
Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
.
- Prev by Date: VS2005 visualizers
- Next by Date: RE: crystal report viewer
- Previous by thread: VS2005 visualizers
- Next by thread: I cannot view any stored procedure inside of Visual Studio 2003 that was created in SQL Server 2005
- Index(es):
Relevant Pages
|