[REQ] Add possibility to use "\n" in ButtonBar Too

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
Samuel
Power Member
Power Member
Posts: 1930
Joined: 2003-08-29, 15:44 UTC
Location: Germany, Brandenburg an der Havel
Contact:

[REQ] Add possibility to use "\n" in ButtonBar Too

Post by *Samuel »

I wrote a util (ButtonBar eXtended) to be able to support key modifiers on ButtonBar. The problem is that the descriptions get very long. For example:

Code: Select all

Synchronize Directories (Ctrl - Synchronize with first preset | Alt - Synchronize with second preset | Ctrl & Alt - use standalone Synchronize)
There is no way to use something like:

Code: Select all

Synchronize Directories\nSynchronize with first preset (Ctrl)\nSynchronize with second preset (Alt)\nuse standalone Synchronize (Ctrl & Alt)
Would lead to this multiline tooltip:

Code: Select all

Synchronize Directories
Synchronize with first preset (Ctrl)
Synchronize with second preset (Alt)
use standalone Synchronize (Ctrl & Alt)
I would also like "\t" for tabs, but "\n" would be the most important.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48113
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Indeed I considered this, but the problem is that these tips often contain paths, so \n could already be used there...
Author of Total Commander
https://www.ghisler.com
User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom »

You could use "|" as an escape key for the ButtonBar Tooltip field. Like other usages of an escape key, to actually display an "|" just double it: ||
Much like the ampersand in the MenuBar.mnu files &&

so: |\n = newline, and |\t = tab

"|" is an illegal character for Files or Folders, along with: \ / : * ? " < > and unlike \ and / wouldn't be used for unixy or windowsy paths either.
*BLINK* TC9 Added WM_COPYDATA and WM_USER queries for scripting.
User avatar
Samuel
Power Member
Power Member
Posts: 1930
Joined: 2003-08-29, 15:44 UTC
Location: Germany, Brandenburg an der Havel
Contact:

Post by *Samuel »

I dont care if it will be "\n" or "|".

"|" is also a common way to get to the next line. (I also tried "|" when I tested if 2 line Tooltips are possible.)

Please add it. Would improve readability of my long lines enormous.
jjk
Member
Member
Posts: 181
Joined: 2003-07-03, 10:41 UTC

Post by *jjk »

Support also, because BBX is very useful and deserves the best attention.
User avatar
Samuel
Power Member
Power Member
Posts: 1930
Joined: 2003-08-29, 15:44 UTC
Location: Germany, Brandenburg an der Havel
Contact:

Post by *Samuel »

Do you consider it Christian?
As it should only be little code?

I support the approach from "Balderstrom":

Code: Select all

Line 1|Line 2|Line 3 with a vertical separator "||" in it
Resulting in:

Code: Select all

Line 1
Line 2
Line 3 with a vertical separator "|" in it
User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom »

@Samuel, well my suggestion was:
|\n, and |\t :-) and to display a normal "|" just have ||

It would even make sense for the descript.ion's to do this, as there's often "Http:\\addresses.com" (in mine at least), though I don't believe I've ever needed a \n or /n address|path.
*BLINK* TC9 Added WM_COPYDATA and WM_USER queries for scripting.
User avatar
Samuel
Power Member
Power Member
Posts: 1930
Joined: 2003-08-29, 15:44 UTC
Location: Germany, Brandenburg an der Havel
Contact:

Post by *Samuel »

Sorry to read your suggestion only fast.
You are right about the suggestion you made. Its something other than I had in mind.

Then I support my own suggestion now ;-)
("|" and "||")

I think "|\n" "|\t" is a bad choice.
Something like a new escape char would be better then. Its not the usual way to escape something with 3 chars. AutoHotkey uses "`n" and "`t".
User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom »

Oh I agree, I suggested | as an escape, and \n to indicate newline, as that's how it's used almost everywhere.
If one could rewrite history we wouldn't be stuck with the horrible exceptions that are required to do basic text management in the linux shell, or having to write \\\\\\\ for perl|regex strings. And all the problems that the "legal" characters !,% can cause in Windows FileNames and Paths when parsing at the command line. Or "~" in Windows to Linux.


AHK would of been much better off with | or the like, its an illegal character and ` is not :-)
If linux had of used | as an escape, then |? could of been pipe...and we wouldn't have the nonsense that we have to deal with now, and that will likely never go away.

In retrospect, I would say |n and |t would be better yes.
*BLINK* TC9 Added WM_COPYDATA and WM_USER queries for scripting.
User avatar
Samuel
Power Member
Power Member
Posts: 1930
Joined: 2003-08-29, 15:44 UTC
Location: Germany, Brandenburg an der Havel
Contact:

Post by *Samuel »

Added now. Thanks.
Post Reply