ArcObjects Library Reference (Controls)  

ITOCControl2 Interface

Provides access to members that control the TOCControl.

Product Availability

Available with ArcGIS Engine.

Description

The ITOCControl2 interface provides additional members for tasks related to the TOCControl, such as enabling the drag and drop of layers and working with selected items.

Members

Description
Method AboutBox Displays a dialog of information about the TOCControl.
Method AboutBox Displays a dialog of information about the TOCControl.
Read-only property ActiveView The ActiveView used to populate the TOCControl.
Read-only property ActiveView The ActiveView used to populate the TOCControl.
Read/write property Appearance The appearance of the TOCControl.
Read/write property Appearance The appearance of the TOCControl.
Read/write property BorderStyle The border style of the TOCControl.
Read/write property BorderStyle The border style of the TOCControl.
Read-only property Buddy The object whose ActiveView is used to populate the TOCControl.
Read-only property Buddy The object whose ActiveView is used to populate the TOCControl.
Read/write property CustomProperty A property to associate data with a control.
Read/write property CustomProperty A property to associate data with a control.
Read/write property Enabled Indicates whether the TOCControl can respond to user generated events.
Read/write property Enabled Indicates whether the TOCControl can respond to user generated events.
Read/write property EnableLayerDragDrop Indicates if layers can be dragged and dropped in the control.
Method GetSelectedItem Returns the selected item in the TOCControl.
Method HitTest Returns the item in the TOCControl at the specified coordinates.
Method HitTest Returns the item in the TOCControl at the specified coordinates.
Read-only property hWnd Handle to the window associated with the TOCControl.
Read-only property hWnd Handle to the window associated with the TOCControl.
Read/write property KeyIntercept A property that specifies interception of key strokes that are normally handled by the container. When intercepted the OnKeyDown and OnKeyUp events will be called. This value can be a combined bit mask of esriKeyIntercept enum values.
Read/write property KeyIntercept A property that specifies interception of key strokes that are normally handled by the container. When intercepted the OnKeyDown and OnKeyUp events will be called. This value can be a combined bit mask of esriKeyIntercept enum values.
Read/write property LabelEdit Label editing state.
Read/write property LabelEdit Label editing state.
Read/write property LayerVisibilityEdit Layer visibility editing state.
Read/write property LayerVisibilityEdit Layer visibility editing state.
Read/write property MouseIcon Custom mouse icon used if MousePointer is 99.
Read/write property MouseIcon Custom mouse icon used if MousePointer is 99.
Read/write property MousePointer The mouse pointer displayed over the TOCControl.
Read/write property MousePointer The mouse pointer displayed over the TOCControl.
Read-only property Object A property that returns the underlying control. This can be used when the control is inside a wrapper object that has been added by a development environment.
Read-only property Object A property that returns the underlying control. This can be used when the control is inside a wrapper object that has been added by a development environment.
Method SelectItem Sets the selected item in the TOCControl.
Method SetActiveView Sets the ActiveView used to populate the TOCControl.
Method SetActiveView Sets the ActiveView used to populate the TOCControl.
Method SetBuddyControl Sets a control to be a buddy of the toolbar, this control must support ITOCBuddy.
Method SetBuddyControl Sets a control to be a buddy of the toolbar, this control must support ITOCBuddy.
Method Update Updates the contents of the TOCControl to match its ActiveView.
Method Update Updates the contents of the TOCControl to match its ActiveView.

CoClasses that implement ITOCControl2

CoClasses and Classes Description
TOCControl ESRI TOCControl
[C#]

When querying interface to ITOCControl2 in Visual Basic .NET or Visual C# .NET the Object property or container specific code must be used. This is because .NET contains the real control inside a wrapper object known as an host.

ITOCControl2 tocControl = axTOCControl1.Object as ITOCControl2;

[Visual Basic .NET]

When querying interface to ITOCControl2 in Visual Basic .NET or Visual C# .NET the Object property or container specific code must be used. This is because .NET contains the real control inside a wrapper object known as an host.

Dim tocControl As ITOCControl2 = AxTOCControl1.Object