This topic has not yet been rated - Rate this topic

Window.SetSelectionContainer Method

Allows setting objects to be active in the Properties window when this window is active.

Namespace: EnvDTE
Assembly: EnvDTE (in envdte.dll)

void SetSelectionContainer (
	ref Object[] Objects
)
void SetSelectionContainer (
	/** @ref */ Object[] Objects
)
JScript does not support passing value-type arguments by reference.

Parameters

Objects

Required. An array of objects for the Properties window.

Sets the objects that should be passed to the Properties window whenever the window has focus. SetSelectionContainer works only on windows created with the CreateToolWindow method. Other tool windows, such as Solution Explorer and Task List, already have code for setting what is displayed in the Properties window.

SetSelectionContainer allows you to associate objects with the window so that whenever the window has focus, the Properties window displays properties for those objects. For example, you would use this property if you have a custom tool window that displays a chart and you want to display properties in the Properties window in order to change characteristics of the chart.

If SetSelectionContainer is passed an empty Variant value, it removes the displayed object. The object displays when the tool window is active and the objects are available from the selection container.

SetSelectionContainer requires a tool window. For an example of how to use this method, see the ToolWindow sample on the Visual Studio Automation Samples webpage: http://msdn.microsoft.com/vstudio/downloads/samples/automation.asp.

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
what's 'empty Variant value' in c#?

is it null? I guess not.

[tfl - 05 09 09] Hi - and thanks for your post. You should post questions like this to the MSDN Forums at http://forums.microsoft.com/msdn or the MSDN Newsgroups at

http://www.microsoft.com/communities/newsgroups/en-us/ . You are much more likely get a quicker response using the forums than through the Community Content. For specific help about:
Visual Studio :
http://groups.google.com/groups/dir?sel=usenet%3Dmicrosoft.public.vstudio%2C &
SQL Server :
http://groups.google.com/groups/dir?sel=usenet%3Dmicrosoft.public.sqlserver%2C &
.NET Framework :
http://groups.google.com/groups/dir?sel=usenet%3Dmicrosoft.public.dotnet.framework
PowerShell : http://groups.google.com/group/microsoft.public.windows.powershell/topics?pli=1
All Public : http://groups.google.com/groups/dir?sel=usenet%3Dmicrosoft.public%2C &

Advertisement