|
-
Dec 24th, 2004, 11:02 PM
#1
Thread Starter
Junior Member
listview width resize [Resolved]
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
Last edited by Neith; Dec 25th, 2004 at 10:13 PM.
Reason: Resolved
-
Dec 25th, 2004, 12:56 AM
#2
Re: listview width resize
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...
-
Dec 25th, 2004, 07:22 PM
#3
Thread Starter
Junior Member
Re: listview width resize
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
-
Dec 25th, 2004, 07:43 PM
#4
Re: listview width resize
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
-
Dec 25th, 2004, 09:00 PM
#5
Thread Starter
Junior Member
Re: listview width resize
that did it, thank you!
~Neith
-
Dec 25th, 2004, 09:02 PM
#6
Re: listview width resize
-
Dec 25th, 2004, 09:17 PM
#7
Re: listview width resize
Now that we've helped you, please help us by editing the first post and adding the green checkmark.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|