Quick toggle custom columns

Discuss and share scripts and script files...
Post Reply
highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Quick toggle custom columns

Post by highend »

For me it's always a hassle to add a custom column to the current tab (too many clicks and mouse repositioning involved)
- Add Column
- Select Custom Column...
- ...

An (for me) easier way is provided by this script...

All checked custom columns are added to the current pane, all unchecked ones are removed. Easily invokable via a shortcut,
catalog entry, button, whatever...

Current version:
Toggle custom columns_v0.2.xys
(5.93 KiB) Downloaded 174 times
Old versions:
Toggle custom columns_v0.1.xys
(5.6 KiB) Downloaded 129 times
One of my scripts helped you out? Please donate via Paypal

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Quick toggle custom columns

Post by admin »

Not bad, might even use it. :)

PS: Great, I do use it! :appl:

klownboy
Posts: 4109
Joined: 28 Feb 2012 19:27

Re: Quick toggle custom columns

Post by klownboy »

Yes, that script makes it a lot easier to add and remove custom columns. :tup: It might be too much work, but an additional thought might be to indicate with a pre-checked box whether that the custom column is currently applied to that specific folder you're currently viewing in the list pane.
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Re: Quick toggle custom columns

Post by highend »

It might be too much work, but an additional thought might be to indicate with a pre-checked box whether that the custom column is currently applied to that specific folder you're currently viewing in the list pane
If I don't get you wrong that's what it is already doing... :titter:
And if it's not, I consider it as a bug. Post the custom column definition for one that isn't checkmarked but visible in the current pane
One of my scripts helped you out? Please donate via Paypal

klownboy
Posts: 4109
Joined: 28 Feb 2012 19:27

Re: Quick toggle custom columns

Post by klownboy »

Sorry highend, I didn't realize it was suppose to be reflecting existing CCs already. Originally when I ran it it reflected no checked boxes. When I just ran it again it only reflected the one box that I added on my original run (Video size) as you can see in the capture.
CC_Capture.JPG
CC_Capture.JPG (67.42 KiB) Viewed 2901 times
Examples: Dimension and Aspect Ratio are simply using Special Property | Dimensions and Aspect Ratio respectively. Both are: Format:Mixed, Trigger: Click, Item type: Files, Item filter: jpg;jpeg;png;gif;psd;psb;ico
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Re: Quick toggle custom columns

Post by highend »

Show me the snippet of both of these columns please and (for one of them) a screenshot of how it is configured
(I need to see all checkmarks inside the "Columns:" listview part in the config window for it)

Additionally please tell me if it works when you activate the cc number 12 with this script.
Is the cc checked on the next run and does it vanish when you deselect it?
One of my scripts helped you out? Please donate via Paypal

klownboy
Posts: 4109
Joined: 28 Feb 2012 19:27

Re: Quick toggle custom columns

Post by klownboy »

CC_Dimension_Capture.JPG
CC_Dimension_Capture.JPG (40.93 KiB) Viewed 2887 times
CC_Dimensions_Capture.JPG
CC_Dimensions_Capture.JPG (35.37 KiB) Viewed 2887 times
Concerning CC#12, it did get properly added and removed via your script. I don't remember why I added that CC probably testing something especially since I have NO tags. I deleted it.
Attachments
CC_AR_Capture.JPG
CC_AR_Capture.JPG (33.49 KiB) Viewed 2887 times
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Re: Quick toggle custom columns

Post by highend »

I can't reproduce this behavior here, Ken...

Set up both columns like in your screenshots, the script perfectly shows them as active
when invoked and is able to remove / add them accordingly...

Can you step through it to see why it fails on your side?

Once we find out the culprit I release the next version. Fixed a small bug in v0.1
in the meantime, the name of a special property cc was always derived from the special
property, even if a value for the caption was used...
One of my scripts helped you out? Please donate via Paypal

klownboy
Posts: 4109
Joined: 28 Feb 2012 19:27

Re: Quick toggle custom columns

Post by klownboy »

Hey highend, I stepped through the script a couple of times and wasn't able to pin point anything. A great deal of regex which I can't follow. I assume the problem would have to be in the area where the "+" is assigned to active columns. No Config settings should affect this I assume. I sent you my Custom Columns section of my ini file incase you can spot some obvious issue. Don't worry about this. I'll look some more later. Thanks.
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Re: Quick toggle custom columns

Post by highend »

Hi Ken,

this is an animation of how the script behaves with your custom column setup
(sorry, forgot to capture the mouse cursor but I hope it's visible what I'm doing here):
anim.gif
anim.gif (353.48 KiB) Viewed 2833 times
Can't see anything wrong here...
One of my scripts helped you out? Please donate via Paypal

klownboy
Posts: 4109
Joined: 28 Feb 2012 19:27

Re: Quick toggle custom columns

Post by klownboy »

I don't know what caused the original problem for me even after doing a fresh, but I forgot to mention that I have a bunch of column layouts and one for the Downloads folder layout that I was using with your script. After reloading the column layout, applying some modifications to my columns, the check marks in the dialog box are all appearing as they should be reflecting all existing custom columns. I have another column layout I'll apply to my MP3 folder and report back later.
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Re: Quick toggle custom columns

Post by highend »

v0.2 at the beginning of this thread...

Code: Select all

/*
@Changelog:
v0.2
  ! The name for a special property column was always taken from the (non-technical) part of
    the special property, even if a name for the caption is used
*/

One of my scripts helped you out? Please donate via Paypal

klownboy
Posts: 4109
Joined: 28 Feb 2012 19:27

Re: Quick toggle custom columns

Post by klownboy »

Hi highend, I've been meaning to get back to you on your script. When I checked out my detailed view for my MP3 folder, my previously saved detailed view was not showing. It had been a long time since I'd been in the folder. So I reloaded my saved column layout and saved my FVS. Once that was done, I ran your script and it worked fine.

I wanted to mention, you saved a Q & A post that I was going to make today about only wanting to see the column headers when in Details View. I noticed your post this morning over here viewtopic.php?f=3&t=18768#p158094 What a coincidence. No need for me to see the headers in other views. Honestly, I'm not sure why that wouldn't be the default. These settings in the ini give me exactly what I want (i.e., seeing the headers in Details View only). Thanks.

Code: Select all

SortHeadersInAllViews=0
SortHeadersOffInDetailsToo=0
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

Post Reply