ComponentTray.GetNextComponent Method (IComponent, Boolean)


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Similar to Control.GetNextControl, this method returns the next component in the tray, given a starting component.

Namespace:   System.Windows.Forms.Design
Assembly:  System.Design (in System.Design.dll)

public IComponent GetNextComponent(
	IComponent component,
	bool forward


Type: System.ComponentModel.IComponent

The component from which to start enumerating.

Type: System.Boolean

true to enumerate forward through the list; otherwise, false to enumerate backward.

Return Value

Type: System.ComponentModel.IComponent

The next component in the component tray, or null, if the end of the list is encountered (or the beginning, if forward is false).

.NET Framework
Available since 2.0
Return to top