I was able to produce an add-in, which provides two user interfaces. However they are shown as tabs in the Add-Ins window. Earlier I worked with a single control and this one has been shown in its own window.
They both have different GUIDs and are registered COM objects. I initiate like this:
control1 = GuiManager.Repository.AddWindow("Quick Interface Editor", "QuickInterfaceEditor.QuickInterfaceEditorControl") as QuickInterfaceEditorControl;
control2 = GuiManager.Repository.AddWindow("Tagged Values Editor", "TaggedValuesEditor.TaggedValuesEditorControl") as TaggedValuesEditorControl;
Is there a way to bring both tabs to their own windows? Or at least replace the "Add-Ins" title by my add-in's name?
There are basically three ways to show a window as an add-in
Repository.AddWindow()
This adds an add-in window in the add-ins docked window. If this is the only add-in window that uses this section, than the docked window will get the title from the add-in window.
If there are multiple add-ins, the title will be Add-Ins and each add-in will get a tab, like you noticed with your add-ins.
Repository.AddTab()
This adds a window to the main diagram space
Form.ShowDialog() or Form.Show()
This allows you to show a model dialog, or regular window on top of EA's GUI
Related
I have a Add-in in C#, and I am running Enterprise Architect through it. And now I have an access to "system output window" in Enterprise Architect, which can be displayed/docked over EA's GUI. And now I need to get access to "Properties window" by which I can create a new(my own custom tab)like Property dialogue window inside that window.
The Subject is to have a "structured Tagged Values" created from Add-in. And those tagged values have to come inside a "CUSTOMIZED NEW TAB" in the Properties window of an element. For that we need to get the control over the "properties window" in Enterprise Architect from Add-in.
Plz suggest us the way on how to create a "NEW TAB" inside a properties window of an element.
Enterprise Architect does not (yet) have any possibility to extend any existing popup windows with extra tabs. (This is also not possible using MDG technologies. Some MDG technologies extend EA, but these are incorporated in the application and not loaded through a separate XML file.)
The API does offer you an option to create new controls in the form of;
Tabs: Repository.AddTab
Addin Windows (dockable/floating): Repository.AddWindow
You could show your desired content of an API element in such a control. Or you could, using WPF or Windows Forms, create and show a custom popup window. You could even make that popup window modal as to block any further access (like the properties window does).
I'm creating an add-in for Microsoft Excel that helps to automate some of my accounting processes. One of the pieces of the add-in is a ribbon tab with a button. Clicking this button opens a form with a list box that displays each account (worksheet) name and their respective balances.
The problem is that the rest of the controls in Excel are still tangible while the form is open. If, for example, a person were to change the name of the worksheet while the form was open, it may cause an error.
I noticed that message boxes render an application unclickable until they exit the screen. It isn't limited to just message boxes, either- I've seen the Nexus Mod Manager do the same thing when installing mods for games. I've seen it in many applications, but I haven't figured out how to do it myself.
My question is simple: how do I change the properties of a form such that the rest of the application is disabled until the form is closed?
What you need is a modal form. Opening a modal form will "block" the entire UI until it is closed, just like message boxes do.
Have a look at http://msdn.microsoft.com/en-us/library/aa984358(v=vs.71).aspx
I've developed an application-level add-in for Word, and encountered the following problem:
When another document is opened (and another Word Window appears), I cannot use the Add-In in the newly-opened window. Moreoever, when I click the button in the Ribbon that should display the Add-In, it's getting displayed in the original window, and not the new one.
How can I make the Add-In appear also in the new Window?
Thanks!
UPDATE: After realizing the question was not clear enough, let me clarify:
The Add-In displays custom task pane.
What happens is that when I open a new window of Word, the button that displays / hide the pane affects only the original window, and not the new one, so I cannot display two instances of the task pane.
Why is that? How can I display multiple task panes in Word?
That's becuase TaskPane is document bound object. If you create your TaskPane in Addin_Startup it will be bound to the active document. While having two instances od Word Document, you have that Active document still opened, so any button on Ribbon (which is shared between instances) will only affect that first window.
The solution is problably to create multiple TaskPanes for multiple documents, but that's kinda ghetto solution.
I am new to VSTO programming. I have created a basic addin for Outlook 2007 that monitors a folder containing XML text files which it opens and then sends them as an email, then deletes them. this all works fine.
I want the user to be able to configure certain settings for the way the addin/program will operate, such as the folder that it will monitor, and other things. The logical way to do this is to create a menu item in the addin (which I have also done) that opens a windows form (or XAML window) that allows them to enter the parameters.
In my addin I added a new item Windows Form, which worked, and the designer opened. However, in my addin code I cannot open the form. The Show() method normally associated with form objects is not available.
Is this simply something you cannot do, or am I just doing it the wrong way?
I have read about Outlook form regions, but these seemed to be attached to outlook items such as a new email, task, appointment etc... there doesnt seem to be a way to create a form region that can be opened in the main window of Outlook.
Ideally, I would like to go with my original method of opening a new window from a menu item, but if this isnt possible I would like to hear other solutions.
Thanks,
Will.
For a normal form, it sounds like you didn't just add System.Windows.Forms as a reference,
create the object then show it eg.
Form myFrm = new frmFlightList();
myFrm.Show();
This should work in a VSTO addin, as it does in any other form. The CMSConnectorControl object you refer to is a distraction to others for the general case of just wanting to display a form.
figured this out, After I built my form I just had to add these lines
CMSConnectorControl formMain = new CMSConnectorControl();
formMain.ShowDialog();
to the ThisAddin_Startup() function.
I'm using VSTO with Outlook 2007 and I need to show a form (or a user control) inside the main window in outlook when the user clicks a specific toolbar button, that is, I need it to appear in the same window that the reading pane appears and not to open in a window by itself. Is this possible?
Thank you for your time.
Yandos,
you can do this using Subclassing, this can be a complicated subject but a great primer is over at http://www.codeproject.com/KB/office/additional_panel_Outlook.aspx
or you could use a comercial product that does that for you e.g, add-in-express
Yes, you can create an Outlook Form Region. Here's one of the many resources available on the subject:
Walkthrough: Creating an Outlook Form Region
http://msdn.microsoft.com/en-us/library/aa942741(VS.80).aspx