ListView Property
Visual Studio .NET 2003
Returns or sets whether items in a particular ToolBox tab display in List view or Icon view format.

[Visual Basic .NET]
Public Property ListView() As Boolean
[Visual Basic 6]
Property Get ListView() As Boolean Property Let ListView( _ ByVal NewValue As Boolean _ )
[C++]
HRESULT __stdcall get_ListView( /* [out, retval] */ VARIANT_BOOL* retVal ); HRESULT __stdcall put_ListView( /* [in] */ VARIANT_BOOL NewValue );
[C#]
public bool ListView {get; set;}
[JScript .NET]
public function get ListView() : Boolean public function set ListView( NewValue : Boolean )
Parameters
- NewValue
- Represents the state of the view. True if the ToolBox tab is in List view, False if not.
Return Value
True if the ToolBox tab is in List view, False if not.
Remarks
ListView applies on a tab-by-tab basis in the ToolBox. That is, one tab can have List view while another has Icon view.
The List and Icon views are similar to those in Windows Explorer. In List view, the contents of the Toolbox are listed as text descriptions, one after another, with an icon on the left side. In Icon view, each item is represented only by an icon. You can get a tool tip description of the icon by moving over it with the mouse arrow.
Example
Sub ListViewExample()
' This toggles the view of the Toolbox.
' Define the variables and create an object reference to the IDE's
' ToolBox object.
Dim win As Window = DTE.Windows.Item(Constants.vsWindowKindToolbox)
Dim objToolbox As ToolBox = win.Object
Dim colTbxTabs As ToolBoxTabs
' Create an object reference to the ToolBoxTabs object.
colTbxTabs = objToolbox.ToolBoxTabs
' Add a new Text item to the first tab in the Toolbox.
MsgBox("Turning Toolbox to List view...")
colTbxTabs.Item(1).ListView = False
MsgBox("Turning Toolbox to Icon view...")
colTbxTabs.Item(1).ListView = True
End Sub
See Also
Applies To: ToolBoxTab Object