ToolWindows class
The IDE’s tool-window factory — reached through Host.ToolWindows. Use Add to create a new HTML-rendered pane; populate its DOM through the returned ToolWindow’s RootDomElement; show the pane by setting Visible = True.
Set myWindow = Host.ToolWindows.Add("MyAddIn.MyWindow", "MyAddIn.MyWindowPosition")
Methods
Add
Creates a new tool window and returns its ToolWindow object. The newly-created pane starts out Visible = False; populate it, then flip Visible = True to show it.
Syntax: toolWindows.Add( Name [, UniqueIdForPositionPersistance ] ) As ToolWindow
- Name
- required An internal name for the tool window. String. Pick an addin-prefixed value so multiple addins do not collide on names.
- UniqueIdForPositionPersistance
- optional A stable identifier the IDE uses to remember the pane’s size, position, and dock state across IDE restarts. String. Omit to make the pane non-persistent — every open is sized from
suggestedWidth/suggestedHeight(see ToolWindow) and positioned by the IDE’s default placement logic.
' Persisted (preferred for user-visible panes):
Set myWindow = Host.ToolWindows.Add("MyAddIn.SearchPane", "MyAddIn.SearchPane.position")
' Non-persistent (for transient one-shot dialogs):
Set myWindow = Host.ToolWindows.Add("MyAddIn.QuickPrompt")