
Total width of columns = Width of ListView
The problem here is knowing the width of the client area of the ListView
control. This is the total width less the width of the vertical scroll bars
and borders.
There should be a message you could send to the ListView window to know
that, but I simply subtract 1 (one) inch from the controls width and allways
get a "reasonably" good display. Check the attached form.
On Form_Load a ListView control is initialized with 3 columns "File", "Date"
and "Size", then it is populated with the contents of the "c:\windows\"
directory.
On Form_Resize the ListView is resized so that it fills the form, and the
the first Column ("File") is resized.
Alejandro.
Pigeon escribi en mensaje ...
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.