-
Listview strikes again
Hi
I use one of the methods of Listview to add columns to the control(Ex: Listview.Columns.Add("Name", width, horizontalalignment)), and Microsoft documention explain that -1 and -2 are valid values to set the width parameter, respectively, to size the column to the largest subitem or columnheader caption.
Meanwhile when i set the width parameter to that values i only get a mega column.
Anyone have a explanation ?
-
I don't know about the -1 as all this does is make the column real small but the -2 sets the column headers to the width of the text in the headers not the items in the rows.....they will be truncated to fit the width of the headers.
The last column header will take up the full space thats remaining depending on how big a listview you made.
Post your code if your having trouble so we can see what it is your doing and someone may be able to give you an answer to your problem.