Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
XML RSS Feed
 
 
 
 
 
 
 
 
Old Pages
 
Old Index
Site Map
What's New
 
Books
How To
Tips & Tricks
Tutorials
Stories
Performance
Essays
Links
Q & A
New in VB6
Free Stuff
Pictures
 
 
 
TitleMake the columns fit the data in a ListView control in VB .NET
KeywordsListView, column width, VB.NET
CategoriesVB.NET, Controls
 
If you set a column's width to -1, the ListView control resizes the column to fit its data. If you set its width to -2, the control sizes the control to fit the column's data and header.
 
' Size the columns.
For i As Integer = 0 To lvwBooks.Columns.Count - 1
    lvwBooks.Columns(i).Width = -2
Next i
 
 
Copyright © 1997-2003 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated