Book a Demo

Author Topic: C# AddIn: Menu item as checkbox and get tooltips  (Read 6108 times)

AndreasBaur

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
C# AddIn: Menu item as checkbox and get tooltips
« on: April 11, 2012, 12:42:36 am »
Hello everyone,

how can create or handle a menu item for my addin as a checkbox and how can i create tooltips for menu items?
The reason for the checkbox is, that i want a different behavior of my addin when the menu item is checked. So i need to retrieve the state of this menu item in my methods. Is that even possible? Should at least be, i think.

Thanks in advance
Andy

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: C# AddIn: Menu item as checkbox and get toolti
« Reply #1 on: April 11, 2012, 01:02:32 am »
Maybe it should. But AFAIR it is not possible.

q.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: C# AddIn: Menu item as checkbox and get toolti
« Reply #2 on: April 11, 2012, 03:30:00 pm »
Andreas,

I'm afraid you'll have to simulate that yourself.
You can only control the text of the menu items, so you could do someting like "[ch8730] My MenuOption" when it is selected.
Tooltips are not possible at the moment.

You can of course always send in a feature request

Geert

AndreasBaur

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Re: C# AddIn: Menu item as checkbox and get toolti
« Reply #3 on: April 13, 2012, 04:33:33 am »
Thank you, both, for your answer.

That will help me at least a bit. Nevertheless, it's really bad, that you can not have a checkbox or something like that in your menu, as well as the tooltip. It is possible in the menu that is already in EA, so why not make it yourself.
Well, i think i will send in this as a feature request.

Aaron B

  • EA Administrator
  • EA User
  • *****
  • Posts: 941
  • Karma: +18/-0
    • View Profile
Re: C# AddIn: Menu item as checkbox and get toolti
« Reply #4 on: April 13, 2012, 09:49:34 am »
Regarding placing a tick next to an add-in menu item, see the IsChecked parameter on the EA_GetMenuState broadcast event.
http://www.sparxsystems.com/enterprise_architect_user_guide/9.3/automation/eaadd_insea_getmenustate.html

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: C# AddIn: Menu item as checkbox and get toolti
« Reply #5 on: April 13, 2012, 04:29:03 pm »
Oops, my bad :-[

Geert