views:

144

answers:

1

Is there any way to persistently set the column widths on a Delphi 2007 TShellListView in vsReport mode using code? The normal ShellListView.Columns[0].Width property only sets the width for the current directory, and that width is reset after every change of the current directory or refresh of the file list (including refreshes and directory changes made via code, the user double-clicking a folder, etc.).

+2  A: 

Use its Columns property:

ShellListView.Columns[0].Width := 200;
Rob Kennedy
Your suggestion works (and I voted for it!), but I didn't ask a good question, so I've re-phrased it above. I actually want to resize the columns in a persistent manner, so I don't have to resize them again every time the user clicks on a folder to change the directory, or every time I set the directory manually in code. Currently, the width of each column is reset to the default width (too small for me) after a refresh of the file list.
Anagoge
In that case, I'm afraid I can't help you. It also means that my answer doesn't answer your real question at all.
Rob Kennedy