Tabstops: per panel tabstop widths

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Tabstops: per panel tabstop widths

Post by *DrShark »

Currently the widths/length of tabstops (colums headers of default columns) are shared for both panels,
which means if we move e.g. a tabstop separator of Name and Ext columns in any panel, it is moved the same way in the opposite panel either.
Sometimes it hides necessary information in opposite panel, so often I would prefer an alternative behavior when changing a tabstop header position in one panel wouldn't change it in opposite one, so I suggest (optionally) to store tabstop positions of each pabnel independenly.

Tabstop positions can be also configured in Configuration->Tabstops->Tabstops, where there is position setting for each column which is applied to both panels. Maybe there the "Tabstops" group of settings could be moved to a control with tabs "Left" and "Right" (and/or "Active/Opposite"), so it could be possible to store independent settings for each file window.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
User avatar
tuska
Power Member
Power Member
Posts: 3740
Joined: 2007-05-21, 12:17 UTC

Re: Tabstops: per panel tabstop widths

Post by *tuska »

Support ++
User avatar
HolgerK
Power Member
Power Member
Posts: 5406
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Re: Tabstops: per panel tabstop widths

Post by *HolgerK »

Hmmh,
why not creating two custom column:

Code: Select all

[CustomFields]
Titles=Full(left) | Full(right)
Widths1=234,32,-66,-74,-26
Headers1=Size\nDate\nAttr
Contents1=[=tc.size.bytes]\n[=tc.writedate.y-M-D h:m:s]\n [=tc.attributestr]
Options1=1603|0|96
Widths2=234,32,-66,-74,-26
Headers2=Size\nDate\nAttr
Contents2=[=tc.size.bytes]\n[=tc.writedate.y-M-D h:m:s]\n [=tc.attributestr]
Options2=1603|0|96
which can be resized independent for each panel?

Regards
Holger
Make our planet great again
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Tabstops: per panel tabstop widths

Post by *petermad »

2HolgerK
why not creating two custom column:
That is a good solution as long as you don't use the same Custom columns on both sides - if the view is the same on both sides, tabstops are moved synchronously.

It can be a bit tedious to have Left and Right versions of all your Custom Columns Views - and there is also a limit of 29 Custom columns definitions (according to the Help - but it seems possible to define more than that though).
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
HolgerK
Power Member
Power Member
Posts: 5406
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Re: Tabstops: per panel tabstop widths

Post by *HolgerK »

petermad wrote:a limit of 29 Custom columns definitions (according to the Help - but it seems possible to define more than that though)
History.txt wrote:28.07.09 Added: Increased maximum number of custom column views from 29 to 99. Note that only the first 29 can be set via cm_SrcCustomView* commands, the additional are accessible via new command ranges 6530-, 7030- and 7530-
Actually I'm using 34 custom columns.
petermad wrote:as long as you don't use the same Custom columns on both sides - if the view is the same on both sides
"A simple solution to solve a specific problem is in most cases better than a complex generic solution to solve all problems." (HK 2021)

Regards
Holger
Make our planet great again
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Tabstops: per panel tabstop widths

Post by *petermad »

2HolgerK
See: https://ghisler.ch/board/viewtopic.php?p=249739#p249739
06.06.12 Fixed: Custom columns: maximum length of column title strings was erroneously limited to 259 characters instead of the supported 1023 in the column editor (32/64)
So it is not really predictable how many columns, you can make, it highly depends on the length of the titles of the Custom Columns Views. The titles has to fit in wincmd.ini in one line which can not be more than 1023 characters long - and each title is delimited by a "|" character - so if every title is for example 12 characters in average then you could only make about 78 titles ( (1023 - 7) / 13 = 78 ) - so there is a good reason not to make too long titles and not to make duplicate Views.

TC does not give any warning, when the titles string gets too long - that is what limited it to 24 in my example in https://ghisler.ch/board/viewtopic.php?p=249739#p249739 - when the string could only be 259 characters long. And if the string gets too long the last Custom Columns Views gets corrupted - that is what Ghisler didn't want to change: no warning when the string length gets exceeded.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
HolgerK
Power Member
Power Member
Posts: 5406
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Re: Tabstops: per panel tabstop widths

Post by *HolgerK »

petermad wrote: 2021-05-22, 18:07 UTC So it is not really predictable how many columns, you can make, it highly depends on the length of the titles of the Custom Columns Views. The titles has to fit in wincmd.ini in one line which can not be more than 1023 characters long - and each title is delimited by a "|" character - so if every title is for example 12 characters in average then you could only make about 78 titles ( (1023 - 7) / 13 = 78 ) - so there is a good reason not to make too long titles and not to make duplicate Views.
It's a good practice to use short titles as long as the titles-string is written and read from the ini-file using a 1023 character limited buffer, but imho there is no technical reason preventing TC to use a bigger buffer in this place.
Afaik WritePrivateProfileString and GetPrivateProfileString are only limited by the maximum size of a single ini file (64k).

Regards
Holger
Make our planet great again
User avatar
tuska
Power Member
Power Member
Posts: 3740
Joined: 2007-05-21, 12:17 UTC

Re: Tabstops: per panel tabstop widths

Post by *tuska »

HolgerK wrote: 2021-05-23, 09:07 UTC It's a good practice to use short titles as long as the titles-string is written and read from the ini-file
using a 1023 character limited buffer, but imho there is no technical reason preventing TC to use a bigger buffer in this place.
Overview: View Mode | Auto Switch Mode | Custom columns view
5. ***) VIEW MODE + CUSTOM COLUMNS VIEW | BUTTONS | AHK-SKRIPT (CUSTOM COLUMNS VIEW)
Email 14.08.2019/Mr. Ghisler wrote:Theoretically, the limit of currently max. 1023 characters for titles could be increased, but this would result in
compatibility problems with older Total Commander versions (analogous quote: Email 14.08.2019/Mr. Ghisler)
User avatar
HolgerK
Power Member
Power Member
Posts: 5406
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Re: Tabstops: per panel tabstop widths

Post by *HolgerK »

This incompatibility would only occur if one uses more than 1023 characters and use this specific wincmnd.ini also with older TC versions.
Compare this with the probability that one uses the already allowed 99 custom columns and runs into the problems described by
petermad wrote: 2021-05-22, 18:07 UTC TC does not give any warning, when the titles string gets too long - that is what limited it to 24 in my example in https://ghisler.ch/board/viewtopic.php?p=249739#p249739 - when the string could only be 259 characters long. And if the string gets too long the last Custom Columns Views gets corrupted - that is what Ghisler didn't want to change: no warning when the string length gets exceeded.
petermad's example would currently allow (rough estimated: 1023/259*24) = 95 views but it could also happen with the current 1023 character limit.

And there is always the possibility to introduce a second ini entry "TitlesEx" which is not limited to 1023 characters, while "Titles" would still only hold the first N titles which do not exceed the 1023 limit.
-> No compatibility problem except that the last 99-N custom columns are not accessible in previous versions.
Okay, editing this ini with the older TC version would mess up a lot, but so far this seems to be already the case (see petermad's problem).

Regards
Holger
Make our planet great again
User avatar
Usher
Power Member
Power Member
Posts: 1675
Joined: 2011-03-11, 10:11 UTC

Re: Tabstops: per panel tabstop widths

Post by *Usher »

HolgerK wrote: 2021-05-23, 12:37 UTC And there is always the possibility to introduce a second ini entry "TitlesEx" which is not limited to 1023 characters, while "Titles" would still only hold the first N titles which do not exceed the 1023 limit.
It would be good solution to keep old short Titles as they are and display full titles from TitlesEx when hovering mouse on a column title. Oh, and I would vote for TitlesDescription name rather than TitlesEx.
Andrzej P. Wozniak
Polish subforum moderator
User avatar
HolgerK
Power Member
Power Member
Posts: 5406
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Re: Tabstops: per panel tabstop widths

Post by *HolgerK »

Usher wrote: 2021-05-23, 14:42 UTC It would be good solution to keep old short Titles as they are
Or automatically reduce the longest part of "Titles" by 1 character(when editing with newer version) until the length of the complete string is less than 1024?
"TitlesEx" : i wouldn't call it "TitlesDescription" because in most cases the content would be identical to "Titles" and "Description" does indicates an additional meaning.
One problem exists when older version is used to remove, reorder,.. custom columns: it would destroy the synchronization in newer version between "Titles" and TitlesDescription".
This becomes disturbingly complicated when not only backward but also forward compatibility is important :-(

Maybe using "TitlesEx" only for entries which do not fit into 1023 limitation of "Titles" is the better way to go.
And use numbers like 101,102,.. for the parts(HeaderNNN, ContentNNN,...) in "TitlesEx" to protect them from editing with older TC version.
Even if "Titles" does reverence less than the 99 currently possible entries because the string length of 1023 characters is reached.

Code: Select all

[CustomFields]
;max 99 Custom column definitions; may be less if length of 1023 for Titles-string is reached:
Titles=<Name1>|<Name2>|..|<Name99>   
Header1=..
...
Header99=..
;limited by max size of the ini-file (only visible for newer TC version):
TitlesEx=<Name101>|<Name102> |...|<Name199>
Header101=..
...
Header199=..
Regards
Holger
Make our planet great again
Post Reply