Book a Demo

Author Topic: Add seperator in addin menu?  (Read 7005 times)

Sorno

  • EA User
  • **
  • Posts: 71
  • Karma: +0/-0
    • View Profile
Add seperator in addin menu?
« on: February 14, 2014, 12:17:51 am »
How do I add a horizontal seperator in the addin menu?

It's not mentioned in the documentation regarding "EA_GetMenuItems" or "Define Menu Items".

Thanks!

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Add seperator in addin menu?
« Reply #1 on: February 14, 2014, 01:02:23 am »
IIRC you have to return "-" as menu name.

See also http://www.sparxsystems.com/cgi-bin/yabb/YaBB.cgi?num=1364887854/2#2

Geert
« Last Edit: February 14, 2014, 01:04:18 am by Geert.Bellekens »

Sorno

  • EA User
  • **
  • Posts: 71
  • Karma: +0/-0
    • View Profile
Re: Add seperator in addin menu?
« Reply #2 on: February 14, 2014, 01:47:02 am »
Thank you!

I tried with - before but as in "&-". Which reminds me that I don't know why do the other strings begin with &?

I feel silly each time this happens in the forum. When I search for "seperator" nothing turns up.  And I do use the proper search page, and not the right hand field. I missed the option "This post was made in the last... week"  ::)

Thank you again,
Jonas
« Last Edit: February 14, 2014, 02:10:48 am by Sorno »

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Add seperator in addin menu?
« Reply #3 on: February 14, 2014, 02:48:19 am »
It's not you being silly. There is this Search button which leads you to a very dumb search page. Plus the "Search the forum" which does not return anything at all. Plus (!) the "Search..." on top of this which will make confusion perfect.

q.

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Add seperator in addin menu?
« Reply #4 on: February 14, 2014, 08:42:21 am »
Quote
Which reminds me that I don't know why do the other strings begin with &?
You put the & in front of the letter that you want to be the shortcut key. So "Short&cut" would appear as "Shortcut" and pressing 'c' will execute the command if the menu has focus.
The Sparx Team
[email protected]

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Add seperator in addin menu?
« Reply #5 on: February 14, 2014, 05:36:29 pm »
Quote
Quote
Which reminds me that I don't know why do the other strings begin with &?
You put the & in front of the letter that you want to be the shortcut key. So "Short&cut" would appear as "Shortcut" and pressing 'c' will execute the command if the menu has focus.
Ha, I didn't know that either, thanks KP :)

Geert

Sorno

  • EA User
  • **
  • Posts: 71
  • Karma: +0/-0
    • View Profile
Re: Add seperator in addin menu?
« Reply #6 on: February 14, 2014, 07:13:40 pm »
Many thanks!

Aaron B

  • EA Administrator
  • EA User
  • *****
  • Posts: 941
  • Karma: +18/-0
    • View Profile
Re: Add seperator in addin menu?
« Reply #7 on: February 17, 2014, 10:32:34 am »
Just for further reference regarding the "&" within the menu item text, this is called a Mnemonic Key and is a pretty standard practice to help with keyboard navigation.  See:
http://msdn.microsoft.com/en-us/library/aa233545%28v=vs.60%29.aspx
http://en.wikipedia.org/wiki/Mnemonics_%28keyboard%29