How would i say something like
listview.width = (width of each columnHeader)
to make the listview's width resize so no scrollbar is needed?
Thanks,
~Neith
Printable View
How would i say something like
listview.width = (width of each columnHeader)
to make the listview's width resize so no scrollbar is needed?
Thanks,
~Neith
you have to loop through, and find the widest item, and set the width to that. search the forum, it has been done before. I'm pretty sure I saw it in a class that I downloaded that was posted yesterday. Helpful things...
i'm not talking about autoresizing the column headers, i've done that already. I mean autoresizing the actual listview control width to equal the combined widths of all the columns. is there no ColumnHeaders.Width?
~Neith
Here is a quicky for you but kim that you'll have encounter for a vertical scrollbar (I just hardcoded 600) but that would be another issue:
VB Code:
Dim intWidth% With ListView1 For i = 1 To .ColumnHeaders.Count intWidth = intWidth + .ColumnHeaders(i).Width Next i End With ListView1.Width = intWidth + 600
that did it, thank you!
~Neith
You're very welcome.
Now that we've helped you, please help us by editing the first post and adding the green checkmark.