Page 1 of 1

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

Posted: 2009-07-19, 07:30 UTC
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.

Posted: 2009-07-19, 10:45 UTC
by ghisler(Author)
Indeed I considered this, but the problem is that these tips often contain paths, so \n could already be used there...

Posted: 2009-07-19, 11:45 UTC
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.

Posted: 2009-07-19, 12:07 UTC
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.

Posted: 2009-07-21, 17:59 UTC
by jjk
Support also, because BBX is very useful and deserves the best attention.

Posted: 2009-08-02, 15:53 UTC
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

Posted: 2009-08-02, 15:59 UTC
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.

Posted: 2009-08-02, 19:36 UTC
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".

Posted: 2009-08-02, 22:39 UTC
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.

Posted: 2016-06-09, 05:36 UTC
by Samuel
Added now. Thanks.