
Total width of columns = Width of ListView
The code below sorta works works for making fixed width columns...
There is some extra space, which may be an issue with the control size
metrics of other rocket science.
Hope it help for a start :)
[quick and dirty example code]
Private Sub Form_Load()
'Quick and dirty test code
Dim lvwColHead As ColumnHeader
Dim sngColWidth As Single
sngColWidth = ListView1.Width / ListView1.ColumnHeaders.Count
With ListView1
For Each lvwColHead In .ColumnHeaders
lvwColHead.Width = sngColWidth
Next
End With
End Sub
[end of quick and dirty example]
Quote:
>Dear all,
> How should I resize columns of a ListView, so that the total width of
>all columns will be equal to the width of the ListView control ?
> Thanks...
>Pigeon.