Page 1 of 1

Tabstops: per panel tabstop widths

Posted: 2021-05-22, 09:21 UTC
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.

Re: Tabstops: per panel tabstop widths

Posted: 2021-05-22, 10:07 UTC
by tuska
Support ++

Re: Tabstops: per panel tabstop widths

Posted: 2021-05-22, 10:34 UTC
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

Re: Tabstops: per panel tabstop widths

Posted: 2021-05-22, 11:29 UTC
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).

Re: Tabstops: per panel tabstop widths

Posted: 2021-05-22, 13:05 UTC
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

Re: Tabstops: per panel tabstop widths

Posted: 2021-05-22, 18:07 UTC
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.

Re: Tabstops: per panel tabstop widths

Posted: 2021-05-23, 09:07 UTC
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

Re: Tabstops: per panel tabstop widths

Posted: 2021-05-23, 09:40 UTC
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)

Re: Tabstops: per panel tabstop widths

Posted: 2021-05-23, 12:37 UTC
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

Re: Tabstops: per panel tabstop widths

Posted: 2021-05-23, 14:42 UTC
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.

Re: Tabstops: per panel tabstop widths

Posted: 2021-05-23, 21:48 UTC
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