แก้ไข

แชร์ผ่าน


IToolboxService.GetSelectedToolboxItem Method

Definition

Gets the currently selected toolbox item.

Overloads

GetSelectedToolboxItem()

Gets the currently selected toolbox item.

GetSelectedToolboxItem(IDesignerHost)

Gets the currently selected toolbox item if it is available to all designers, or if it supports the specified designer.

GetSelectedToolboxItem()

Source:
IToolboxService.cs
Source:
IToolboxService.cs
Source:
IToolboxService.cs

Gets the currently selected toolbox item.

public:
 System::Drawing::Design::ToolboxItem ^ GetSelectedToolboxItem();
public System.Drawing.Design.ToolboxItem GetSelectedToolboxItem ();
abstract member GetSelectedToolboxItem : unit -> System.Drawing.Design.ToolboxItem
Public Function GetSelectedToolboxItem () As ToolboxItem

Returns

The ToolboxItem that is currently selected, or null if no toolbox item has been selected.

Applies to

GetSelectedToolboxItem(IDesignerHost)

Source:
IToolboxService.cs
Source:
IToolboxService.cs
Source:
IToolboxService.cs

Gets the currently selected toolbox item if it is available to all designers, or if it supports the specified designer.

public:
 System::Drawing::Design::ToolboxItem ^ GetSelectedToolboxItem(System::ComponentModel::Design::IDesignerHost ^ host);
public System.Drawing.Design.ToolboxItem GetSelectedToolboxItem (System.ComponentModel.Design.IDesignerHost host);
abstract member GetSelectedToolboxItem : System.ComponentModel.Design.IDesignerHost -> System.Drawing.Design.ToolboxItem
Public Function GetSelectedToolboxItem (host As IDesignerHost) As ToolboxItem

Parameters

host
IDesignerHost

The IDesignerHost that the selected tool must be associated with for it to be returned.

Returns

The ToolboxItem that is currently selected, or null if no toolbox item is currently selected.

Remarks

This method returns the currently selected ToolboxItem if it is not designer specific, and only returns a designer-specific currently selected ToolboxItem if the type of the designer host specified in the host parameter matches the type of designer that the currently selected ToolboxItem supports.

Applies to