Book a Demo

Author Topic: Add-In - Custom Tab Control - How to handle Drag&Drop Events  (Read 4554 times)

Daiim

  • EA User
  • **
  • Posts: 51
  • Karma: +0/-0
    • View Profile
Add-In - Custom Tab Control - How to handle Drag&Drop Events
« on: April 26, 2018, 01:12:02 am »
hi guys,

I have registered a custom tab control (using winforms) and want to handle drag&drop event's from ea project browser. The gui indicates a drag&drop process if I use a custom tab control (thats not the case for custom window controls).
I tried:


Is there any other option to achieve this? And if, how can i do this the other way around (initialize a drag&drop with my custom control being the source)? Small hints and code snippets are welcome.

Thanks in advance for any help!



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-In - Custom Tab Control - How to handle Drag&Drop Events
« Reply #1 on: April 26, 2018, 04:26:05 pm »
I don't think this is supported, but to be sure you better contact support.

Geert

EXploringEA

  • EA User
  • **
  • Posts: 172
  • Karma: +8/-0
    • View Profile
Re: Add-In - Custom Tab Control - How to handle Drag&Drop Events
« Reply #2 on: May 02, 2018, 04:35:59 am »
Ever curious, I've had a play and can confirm that I find no way of dragging something from the EA UI onto a custom contol; no surprise as the control is a child with no clear link back to the EA UI code.  In fact, it's clear from the error message "There is no current diagram to perform this operation. Please select a diagram first" 

However, not sure what you application is, so this may be completely out of scope, but what you can do is track the context e.g. the last item selected in the project browser and click in the tab and capture the information relating to the relevant project browser object.  One could argue that it is easier in some ways that drag and drop i.e. -> click & click!  There are probably several variants of this approach depending on your specific requirements.

Adrian
EXploringEA - information, utilities and addins