Separator in button menu [Solved]

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
John_C
Posts: 336
Joined: 16 May 2018 20:04

Separator in button menu [Solved]

Post 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?
Last edited by John_C on 24 Mar 2022 11:39, edited 1 time in total.

xy123
Posts: 217
Joined: 17 Sep 2017 11:46
Location: Win10 64-bit, @100%

Re: Separator in button menu

Post by xy123 »

Code: Select all

"say hi"
  msg("hi");
-
"say hello"
  msg("hello");

John_C
Posts: 336
Joined: 16 May 2018 20:04

Re: Separator in button menu [Solved]

Post by John_C »

Thanks. I didn't expected it will be so plain obvious.

John_C
Posts: 336
Joined: 16 May 2018 20:04

Re: Separator in button menu [Solved]

Post 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

highend
Posts: 15016
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Separator in button menu [Solved]

Post by highend »

And how shall XY know, that your arbitrary menu item name (or it's commands) belong to an already defined keyboard shortcut?
One of my scripts helped you out? Please donate via Paypal

John_C
Posts: 336
Joined: 16 May 2018 20:04

Re: Separator in button menu [Solved]

Post 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 :biggrin:

John_C
Posts: 336
Joined: 16 May 2018 20:04

Re: Separator in button menu [Solved]

Post 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");

highend
Posts: 15016
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Separator in button menu [Solved]

Post 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):

Code: Select all

"New Tab|<xy>|#340"
  tab("new");
One of my scripts helped you out? Please donate via Paypal

John_C
Posts: 336
Joined: 16 May 2018 20:04

Re: Separator in button menu [Solved]

Post 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

admin
Site Admin
Posts: 67299
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Separator in button menu [Solved]

Post by admin »

Correct.

Post Reply