ToolStripContentPanel Class
.NET Framework 2.0
Note: This class is new in the .NET Framework version 2.0.
Represents the center panel of a ToolStripContainer control.
Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in system.windows.forms.dll)
Assembly: System.Windows.Forms (in system.windows.forms.dll)
'Declaration <ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch)> _ <ComVisibleAttribute(True)> _ Public Class ToolStripContentPanel Inherits Panel 'Usage Dim instance As ToolStripContentPanel
/** @attribute ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch) */ /** @attribute ComVisibleAttribute(true) */ public class ToolStripContentPanel extends Panel
ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch) ComVisibleAttribute(true) public class ToolStripContentPanel extends Panel
You can use the top, bottom, left, and right panels of the ToolStripContainer to hold ToolStrip, MenuStrip, or StatusStrip controls. Use the ToolStripContentPanel to hold controls other than these.
The following code example demonstrates adding a RichTextBox to a ToolStripContentPanel.
Imports System Imports System.Collections.Generic Imports System.ComponentModel Imports System.Data Imports System.Drawing Imports System.Text Imports System.Windows.Forms Public Class Form1 Inherits Form Private tsc As ToolStripContainer Private rtb As RichTextBox Public Sub New() InitializeComponent() End Sub <STAThread()> _ Shared Sub Main() Application.EnableVisualStyles() Application.Run(New Form1()) End Sub Private Sub InitializeComponent() Me.tsc = New System.Windows.Forms.ToolStripContainer() Me.rtb = New System.Windows.Forms.RichTextBox() Me.tsc.ContentPanel.Controls.Add(Me.rtb) Me.Controls.Add(tsc) End Sub End Class
System.Object
System.MarshalByRefObject
System.ComponentModel.Component
System.Windows.Forms.Control
System.Windows.Forms.ScrollableControl
System.Windows.Forms.Panel
System.Windows.Forms.ToolStripContentPanel
System.MarshalByRefObject
System.ComponentModel.Component
System.Windows.Forms.Control
System.Windows.Forms.ScrollableControl
System.Windows.Forms.Panel
System.Windows.Forms.ToolStripContentPanel
Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.
Community Additions
ADD
Show: