SelectedItem Object, SelectedItems Collection

See Also

The SelectedItem object represents a selected project or project item.

The SelectedItems collection returns a collection of all SelectedItem objects.

Remarks

Use the SelectedItem object to get the project with the focus to provide context for an add-in.

A project always has a SelectedItems collection, even when there are no project items selected. For example, if the Project Explorer has focus and a project node is selected, there is one SelectedItem object. That selected item's Project property points to the selected project, and the ProjectItem property is Null.

When a file that is not a project item is selected in the alternate directory view, the SelectedItem.Info field provides the full path to the selected file. The Project and ProjectItem properties are set to Null.

For Visual J++, the following fields are also used: