Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong column size with auto column size in some folder #497

Closed
MasouShizuka opened this issue Dec 5, 2021 · 2 comments
Closed

Wrong column size with auto column size in some folder #497

MasouShizuka opened this issue Dec 5, 2021 · 2 comments

Comments

@MasouShizuka
Copy link

I use the auto column size script with add-on folder settings:

FV.SetViewMode(4,16);
FV.Columns ='"System.ItemNameDisplay" -2 "System.DateModified" -2 "System.Size" -2 "System.ItemTypeText" -2';
FV.GroupBy='System.Null';
FV.SortColumn='System.ItemTypeText';

It works good, but if I set the date format like this:yyyy-MM-dd HH:mm

  • In some folders, the column of date is like this:
    image
  • Strangely, it is normal in other folders:
    image
  • If I delete the date setting, it is normal:
    image

To be honest, I don't know the difference between the two kinds folders.


There is another problem.
The minimal column size is 113 x 26:
image
It causes the columns of size and type can't be reduced to the actual maximum column size of all sizes and types of all files.

I wish it can fit like this:
image

@tablacus
Copy link
Owner

tablacus commented Dec 5, 2021

The following script contains a workaround.

FV.SetViewMode(4,16);
FV.Columns='"System.ItemNameDisplay" -2 "System.DateModified" -2 "System.Size" -2 "System.ItemTypeText" -2';
FV.GroupBy='System.Null';
FV.SortColumn='System.ItemTypeText';
setTimeout(function () {
  api.SendMessage(FV.hwndList, LVM_SETCOLUMNWIDTH, 1, -1);
  const col = api.Memory("LVCOLUMN");
  col.mask = 0x40;
  col.cxMin = 0;
  api.SendMessage(FV.hwndList, LVM_SETCOLUMN, 2, col);
  api.SendMessage(FV.hwndList, LVM_SETCOLUMNWIDTH, 2, -1);
 });

image

MS does not want to change the minimum width of the column, so the minimum width will be restored immediately.

Regards,

@MasouShizuka
Copy link
Author

Date column is normal now.

I have seen that after I resize the column over 113, the minimal size is still 113 and can't be adjusted below 113.
But that’s not a problem, after all, I won’t manually adjust the column size, with auto column size script.

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants