Page 1 of 1
Separator in button menu [Solved]
Posted: 24 Mar 2022 11:32
by John_C
I have a ctb with "fire click on mousedown" check box enables, and the button loads the following test script:
Code: Select all
"say hi"
msg("hi");
"say hello"
msg("hello");
I want to add separator line between these two entries, that is, a thin gray line. How to make it?
Re: Separator in button menu
Posted: 24 Mar 2022 11:35
by xy123
Code: Select all
"say hi"
msg("hi");
-
"say hello"
msg("hello");
Re: Separator in button menu [Solved]
Posted: 24 Mar 2022 11:40
by John_C
Thanks. I didn't expected it will be so plain obvious.
Re: Separator in button menu [Solved]
Posted: 24 Mar 2022 11:46
by John_C
Actually, this is a custom tab menu. An abridged version looks as follows:
Code: Select all
"New Tab"
tab("new");
-
"Refresh"
#1001;
"Duplicate"
$indexOfCurrentTab = tab("get", "index");
tab("new");
tab("move", $indexOfCurrentTab + 1);
Maybe you also know how to show keyboard shortcuts (which already exist by default)?
That is, the menu should look like
Code: Select all
New Tab Ctrl+T
----------------------
Refresh F5
Duplicate
Re: Separator in button menu [Solved]
Posted: 24 Mar 2022 12:10
by highend
And how shall XY know, that your arbitrary menu item name (or it's commands) belong to an already defined keyboard shortcut?
Re: Separator in button menu [Solved]
Posted: 24 Mar 2022 12:15
by John_C
Well,
hypothetically it may have a built-in parser and if the line consists of only something like
#123;, it will show the corresponding shortcut

Re: Separator in button menu [Solved]
Posted: 24 Mar 2022 12:31
by John_C
To talk seriously, since there is a way to include an icon, that is,
Code: Select all
"New Tab|<xydata>\Icons\icon.ico"
tab("new");
...I expected it will be also possible to specify a shortcut. Something like this:
Code: Select all
"New Tab|<xydata>\Icons\icon.ico|Ctrl+T"
tab("new");
Re: Separator in button menu [Solved]
Posted: 24 Mar 2022 14:26
by highend
...I expected it will be also possible to specify a shortcut. Something like this:
Yeah, that's possible, but it has nothing to do with "it will show the corresponding shortcut (automatically)"
Code: Select all
"New Tab<tab>Ctrl+T|<xy>"
tab("new");
What would make sense is this (if Don has too much time, what I don't believe):
Re: Separator in button menu [Solved]
Posted: 31 Mar 2022 17:54
by John_C
Thanks. Out of curiosity, it seems the Hamburger menu doesn't support the
<tab> variable?
Code: Select all
Syntax Result
----------------------------------------------------
Foo<tab>Ctrl+N;:newfolder Foo<tab>Ctrl+N
Foo[LiteralTab];:newfolder Foo Ctrl+N
Re: Separator in button menu [Solved]
Posted: 31 Mar 2022 19:31
by admin
Correct.