Provides access to members that define and control a dockable window.
Product Availability
Description
A dockable window is a window that can exist in a floating state or be attached to the main application window. The Table of Contents in ArcMap and the Tree View in ArcCatalog are examples of dockable windows.
When To Use
The IDockableWindow interface is used to query the properties of a dockable window such as the Caption, Name, and ID. This interface also has methods to return whether the window is currently visible, to display the window, and to dock the window in a particular location on the application.
Use the IDockableWindowManager::GetDockableWindow method to get a reference to a particular dockable window.
Members
Description | ||
---|---|---|
Caption | The caption of the dockable window. | |
Dock | Docks or undocks this docking window. | |
ID | The unique id for this dockable window. | |
IsVisible | Indicates if this docking window is visible. | |
Name | The name of the dockable window. | |
Show | Hides or shows the dockable window. | |
UserData | User defined data. |
CoClasses that implement IDockableWindow
CoClasses and Classes | Description |
---|---|
DockableWindow | DockableWindow object. |
Remarks
The following code finds the ArcMap Table of Contents dockable window and, if it's currently visible, the TOC is docked on the right side of the application. You would get m_app from the hook in ICommand::OnCreate().
IDockableWindowManager pDocWinMgr = m_app as IDockableWindowManager;
UID uid = new UIDClass();
uid.Value = "{368131A0-F15F-11D3-A67E-0008C7DF97B9}";
IDockableWindow pTOC = pDocWinMgr.GetDockableWindow(uid);
if (pTOC.IsVisible())
pTOC.Dock(esriDockFlags.esriDockRight);
Dim pDocWinMgr As IDockableWindowManager = TryCast(m_app, IDockableWindowManager)
Dim uid As UID = New UIDClass()
uid.Value = "{368131A0-F15F-11D3-A67E-0008C7DF97B9}"
Dim pTOC As IDockableWindow = pDocWinMgr.GetDockableWindow(uid)
If pTOC.IsVisible() Then
pTOC.Dock(esriDockFlags.esriDockRight)
End If