|< Free Open Study >|| |
There are several tool windows within the IDE, including Output, Command, Task List, and ToolBox. Each of these windows has one or more objects and collections associated with them. This section briefly describes those objects and collections.
The CommandWindow object allows you to get to the Command window in the IDE. You can reference the Command window by using DTE.Windows.Item(vsWindowKindCommand).Object. You can send output text to the CommandWindow object through the use of the OutputString method. You can also clear the window by using the Clear method of the CommandWindow object.
The ContextAttribute object relates to a single attribute for a window's context. See the "Properties, Methods, and Events" link for this object in MSDN for a full explanation of the usage of this object.
The ContextAttributes collection contains all of the attributes related to the solution context or a window context.
The OutputWindowPane object represents a pane in the Output window of the IDE. The Output window normally has a default Output pane. When in debug mode, it also has a Debug pane. You can add panes to the Output window by using the Add method. Once you have created a new pane, you can use the OutputString method to write text to the pane. Once you have created a pane, it cannot be deleted until the IDE is closed. It will not persist between sessions of the IDE.
The OutputWindowPanes collection contains all of the Output window panes in the IDE.
The TaskItem object relates to a single task item in the Task List. Compiler errors are automatically placed in the Task List by the code editor for the respective language. Double-clicking an item will position the code editor at the offending line of code. You can programmatically add task items to the Task List window.
The TaskItems collection contains all the items in the Task List window. Usually, aTaskItem is an error message placed into the task list by the code editor when it encounters a line of code that will not compile.
The TaskList object allows you to navigate through the Task List. There is only one Task List in the IDE and it is created by the IDE.
The TextDocument object represents the text file in the active editor.
The TextWindow object represents a window containing a text document. ATextWindow object is returned by the Object property of a Window object if the window is a Text Editor window.
The Toolbox object represents the Toolbox in the IDE. The Toolbox is a Windows object. When a WinForms Designer is the active document in the IDE, the active ToolBox tab contains the components available for use on the form. If a code editor is the active window, the ToolBox tab represents the Clipboard Ring.
A ToolBoxItem object can be a component in the case that the active window is aWinForms Designer. It is a text item in Clipboard Ring in the case where the active window is a code editor.
The ToolBoxItems collection contains all items in the ToolBox tab.
The ToolBoxTab object relates to a tab in the ToolBox, including the objects that the tab contains.
The ToolBoxTabs collection contains all tabs in the ToolBox object.
The UIHierarchy object provides a common object model for standard tool windows that use tree views to present their contents. You can programmatically select data in these windows by using the UIHierarchy object.
This object represents an open window in the IDE.
The Windows collection contains all of the open windows in the IDE.
|< Free Open Study >|| |