ToolStripContentPanel Class
Represents the center panel of a ToolStripContainer control.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
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.
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; public class Form1 : Form { private ToolStripContainer tsc; private RichTextBox rtb; public Form1() { InitializeComponent(); } [STAThread] static void Main() { Application.EnableVisualStyles(); Application.Run(new Form1()); } private void InitializeComponent() { this.tsc = new System.Windows.Forms.ToolStripContainer(); this.rtb = new System.Windows.Forms.RichTextBox(); this.tsc.ContentPanel.Controls.Add(this.rtb); this.Controls.Add(this.tsc); } }
System.MarshalByRefObject
System.ComponentModel.Component
System.Windows.Forms.Control
System.Windows.Forms.ScrollableControl
System.Windows.Forms.Panel
System.Windows.Forms.ToolStripContentPanel
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.