Movatterモバイル変換


[0]ホーム

URL:


Skip to main contentSkip to in-page navigation

This browser is no longer supported.

Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.

Download Microsoft EdgeMore info about Internet Explorer and Microsoft Edge
Table of contentsExit editor mode

SplitContainer Class

Definition

Namespace:
System.Windows.Forms
Assembly:
System.Windows.Forms.dll
Source:
SplitContainer.cs
Source:
SplitContainer.cs
Source:
SplitContainer.cs
Source:
SplitContainer.cs

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Represents a control consisting of a movable bar that divides a container's display area into two resizable panels.

public ref class SplitContainer : System::Windows::Forms::ContainerControl
public ref class SplitContainer : System::Windows::Forms::ContainerControl, System::ComponentModel::ISupportInitialize
[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.AutoDispatch)][System.Runtime.InteropServices.ComVisible(true)][System.Windows.Forms.Docking(System.Windows.Forms.DockingBehavior.AutoDock)]public class SplitContainer : System.Windows.Forms.ContainerControl
[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.AutoDispatch)][System.Runtime.InteropServices.ComVisible(true)][System.Windows.Forms.Docking(System.Windows.Forms.DockingBehavior.AutoDock)]public class SplitContainer : System.Windows.Forms.ContainerControl, System.ComponentModel.ISupportInitialize
[System.Windows.Forms.Docking(System.Windows.Forms.DockingBehavior.AutoDock)]public class SplitContainer : System.Windows.Forms.ContainerControl, System.ComponentModel.ISupportInitialize
[<System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.AutoDispatch)>][<System.Runtime.InteropServices.ComVisible(true)>][<System.Windows.Forms.Docking(System.Windows.Forms.DockingBehavior.AutoDock)>]type SplitContainer = class    inherit ContainerControl
[<System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.AutoDispatch)>][<System.Runtime.InteropServices.ComVisible(true)>][<System.Windows.Forms.Docking(System.Windows.Forms.DockingBehavior.AutoDock)>]type SplitContainer = class    inherit ContainerControl    interface ISupportInitialize
[<System.Windows.Forms.Docking(System.Windows.Forms.DockingBehavior.AutoDock)>]type SplitContainer = class    inherit ContainerControl    interface ISupportInitialize
Public Class SplitContainerInherits ContainerControl
Public Class SplitContainerInherits ContainerControlImplements ISupportInitialize
Inheritance
Attributes
Implements

Examples

The following code example shows both a vertical and horizontalSplitContainer. The vertical splitter moves in 10-pixel increments. The left panel of the verticalSplitContainer contains aTreeView control, and its right panel contains a horizontalSplitContainer. Both panels of the horizontalSplitContainer are filled withListView controls, and the top panel is defined as aFixedPanel so that it does not resize when you resize the container. Moving the vertical splitter raises theSplitterMoving event, signified in this example by a change to the cursor style. TheSplitterMoved event is raised when you stop moving the splitter. This is signified in this example by the cursor style reverting to the default.

#using <System.Data.dll>#using <System.dll>#using <System.Windows.Forms.dll>#using <System.Drawing.dll>using namespace System;using namespace System::Drawing;using namespace System::Collections;using namespace System::ComponentModel;using namespace System::Windows::Forms;using namespace System::Data;public ref class Form1: public System::Windows::Forms::Form{private:   System::Windows::Forms::SplitContainer^ splitContainer1;   System::Windows::Forms::TreeView^ treeView1;   System::Windows::Forms::SplitContainer^ splitContainer2;   System::Windows::Forms::ListView^ listView2;   System::Windows::Forms::ListView^ listView1;public:   Form1()   {      InitializeComponent();   }private:   void InitializeComponent()   {      splitContainer1 = gcnew System::Windows::Forms::SplitContainer;      treeView1 = gcnew System::Windows::Forms::TreeView;      splitContainer2 = gcnew System::Windows::Forms::SplitContainer;      listView1 = gcnew System::Windows::Forms::ListView;      listView2 = gcnew System::Windows::Forms::ListView;      splitContainer1->SuspendLayout();      splitContainer2->SuspendLayout();      SuspendLayout();            // Basic SplitContainer properties.      // This is a vertical splitter that moves in 10-pixel increments.      // This splitter needs no explicit Orientation property because Vertical is the default.      splitContainer1->Dock = System::Windows::Forms::DockStyle::Fill;      splitContainer1->ForeColor = System::Drawing::SystemColors::Control;      splitContainer1->Location = System::Drawing::Point( 0, 0 );      splitContainer1->Name = "splitContainer1";            // You can drag the splitter no nearer than 30 pixels from the left edge of the container.      splitContainer1->Panel1MinSize = 30;            // You can drag the splitter no nearer than 20 pixels from the right edge of the container.      splitContainer1->Panel2MinSize = 20;      splitContainer1->Size = System::Drawing::Size( 292, 273 );      splitContainer1->SplitterDistance = 79;            // This splitter moves in 10-pixel increments.      splitContainer1->SplitterIncrement = 10;      splitContainer1->SplitterWidth = 6;            // splitContainer1 is the first control in the tab order.      splitContainer1->TabIndex = 0;      splitContainer1->Text = "splitContainer1";            // When the splitter moves, the cursor changes shape.      splitContainer1->SplitterMoved += gcnew System::Windows::Forms::SplitterEventHandler( this, &Form1::splitContainer1_SplitterMoved );      splitContainer1->SplitterMoving += gcnew System::Windows::Forms::SplitterCancelEventHandler( this, &Form1::splitContainer1_SplitterMoving );            // Add a TreeView control to the left panel.      splitContainer1->Panel1->BackColor = System::Drawing::SystemColors::Control;            // Add a TreeView control to Panel1.      splitContainer1->Panel1->Controls->Add( treeView1 );      splitContainer1->Panel1->Name = "splitterPanel1";            // Controls placed on Panel1 support right-to-left fonts.      splitContainer1->Panel1->RightToLeft = System::Windows::Forms::RightToLeft::Yes;            // Add a SplitContainer to the right panel.      splitContainer1->Panel2->Controls->Add( splitContainer2 );      splitContainer1->Panel2->Name = "splitterPanel2";            // This TreeView control is in Panel1 of splitContainer1.      treeView1->Dock = System::Windows::Forms::DockStyle::Fill;      treeView1->ForeColor = System::Drawing::SystemColors::InfoText;      treeView1->ImageIndex = -1;      treeView1->Location = System::Drawing::Point( 0, 0 );      treeView1->Name = "treeView1";      treeView1->SelectedImageIndex = -1;      treeView1->Size = System::Drawing::Size( 79, 273 );            // treeView1 is the second control in the tab order.      treeView1->TabIndex = 1;            // Basic SplitContainer properties.      // This is a horizontal splitter whose top and bottom panels are ListView controls. The top panel is fixed.      splitContainer2->Dock = System::Windows::Forms::DockStyle::Fill;            // The top panel remains the same size when the form is resized.      splitContainer2->FixedPanel = System::Windows::Forms::FixedPanel::Panel1;      splitContainer2->Location = System::Drawing::Point( 0, 0 );      splitContainer2->Name = "splitContainer2";            // Create the horizontal splitter.      splitContainer2->Orientation = System::Windows::Forms::Orientation::Horizontal;      splitContainer2->Size = System::Drawing::Size( 207, 273 );      splitContainer2->SplitterDistance = 125;      splitContainer2->SplitterWidth = 6;            // splitContainer2 is the third control in the tab order.      splitContainer2->TabIndex = 2;      splitContainer2->Text = "splitContainer2";            // This splitter panel contains the top ListView control.      splitContainer2->Panel1->Controls->Add( listView1 );      splitContainer2->Panel1->Name = "splitterPanel3";            // This splitter panel contains the bottom ListView control.      splitContainer2->Panel2->Controls->Add( listView2 );      splitContainer2->Panel2->Name = "splitterPanel4";            // This ListView control is in the top panel of splitContainer2.      listView1->Dock = System::Windows::Forms::DockStyle::Fill;      listView1->Location = System::Drawing::Point( 0, 0 );      listView1->Name = "listView1";      listView1->Size = System::Drawing::Size( 207, 125 );            // listView1 is the fourth control in the tab order.      listView1->TabIndex = 3;            // This ListView control is in the bottom panel of splitContainer2.      listView2->Dock = System::Windows::Forms::DockStyle::Fill;      listView2->Location = System::Drawing::Point( 0, 0 );      listView2->Name = "listView2";      listView2->Size = System::Drawing::Size( 207, 142 );            // listView2 is the fifth control in the tab order.      listView2->TabIndex = 4;            // These are basic properties of the form.      ClientSize = System::Drawing::Size( 292, 273 );      Controls->Add( splitContainer1 );      Name = "Form1";      Text = "Form1";      splitContainer1->ResumeLayout( false );      splitContainer2->ResumeLayout( false );      ResumeLayout( false );   }   void splitContainer1_SplitterMoving( System::Object^ /*sender*/, System::Windows::Forms::SplitterCancelEventArgs ^ /*e*/ )   {            // As the splitter moves, change the cursor type.      ::Cursor::Current = System::Windows::Forms::Cursors::NoMoveVert;   }   void splitContainer1_SplitterMoved( System::Object^ /*sender*/, System::Windows::Forms::SplitterEventArgs^ /*e*/ )   {            // When the splitter stops moving, change the cursor back to the default.      ::Cursor::Current = System::Windows::Forms::Cursors::Default;   }};[STAThread]int main(){   Application::Run( gcnew Form1 );}
using System;using System.Drawing;using System.Collections;using System.ComponentModel;using System.Windows.Forms;using System.Data;public class Form1 : System.Windows.Forms.Form{    private System.Windows.Forms.SplitContainer splitContainer1;    private System.Windows.Forms.TreeView treeView1;    private System.Windows.Forms.SplitContainer splitContainer2;    private System.Windows.Forms.ListView listView2;    private System.Windows.Forms.ListView listView1;    public Form1()    {        InitializeComponent();    }    private void InitializeComponent()    {        splitContainer1 = new System.Windows.Forms.SplitContainer();        treeView1 = new System.Windows.Forms.TreeView();        splitContainer2 = new System.Windows.Forms.SplitContainer();        listView1 = new System.Windows.Forms.ListView();        listView2 = new System.Windows.Forms.ListView();        splitContainer1.SuspendLayout();        splitContainer2.SuspendLayout();        SuspendLayout();        // Basic SplitContainer properties.        // This is a vertical splitter that moves in 10-pixel increments.        // This splitter needs no explicit Orientation property because Vertical is the default.        splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;        splitContainer1.ForeColor = System.Drawing.SystemColors.Control;        splitContainer1.Location = new System.Drawing.Point(0, 0);        splitContainer1.Name = "splitContainer1";        // You can drag the splitter no nearer than 30 pixels from the left edge of the container.        splitContainer1.Panel1MinSize = 30;        // You can drag the splitter no nearer than 20 pixels from the right edge of the container.        splitContainer1.Panel2MinSize = 20;        splitContainer1.Size = new System.Drawing.Size(292, 273);        splitContainer1.SplitterDistance = 79;        // This splitter moves in 10-pixel increments.        splitContainer1.SplitterIncrement = 10;        splitContainer1.SplitterWidth = 6;        // splitContainer1 is the first control in the tab order.        splitContainer1.TabIndex = 0;        splitContainer1.Text = "splitContainer1";        // When the splitter moves, the cursor changes shape.        splitContainer1.SplitterMoved += new System.Windows.Forms.SplitterEventHandler(splitContainer1_SplitterMoved);        splitContainer1.SplitterMoving += new System.Windows.Forms.SplitterCancelEventHandler(splitContainer1_SplitterMoving);        // Add a TreeView control to the left panel.        splitContainer1.Panel1.BackColor = System.Drawing.SystemColors.Control;        // Add a TreeView control to Panel1.        splitContainer1.Panel1.Controls.Add(treeView1);        splitContainer1.Panel1.Name = "splitterPanel1";        // Controls placed on Panel1 support right-to-left fonts.        splitContainer1.Panel1.RightToLeft = System.Windows.Forms.RightToLeft.Yes;        // Add a SplitContainer to the right panel.        splitContainer1.Panel2.Controls.Add(splitContainer2);        splitContainer1.Panel2.Name = "splitterPanel2";        // This TreeView control is in Panel1 of splitContainer1.        treeView1.Dock = System.Windows.Forms.DockStyle.Fill;        treeView1.ForeColor = System.Drawing.SystemColors.InfoText;        treeView1.ImageIndex = -1;        treeView1.Location = new System.Drawing.Point(0, 0);        treeView1.Name = "treeView1";        treeView1.SelectedImageIndex = -1;        treeView1.Size = new System.Drawing.Size(79, 273);        // treeView1 is the second control in the tab order.        treeView1.TabIndex = 1;        // Basic SplitContainer properties.        // This is a horizontal splitter whose top and bottom panels are ListView controls. The top panel is fixed.        splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;        // The top panel remains the same size when the form is resized.        splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;        splitContainer2.Location = new System.Drawing.Point(0, 0);        splitContainer2.Name = "splitContainer2";        // Create the horizontal splitter.        splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal;        splitContainer2.Size = new System.Drawing.Size(207, 273);        splitContainer2.SplitterDistance = 125;        splitContainer2.SplitterWidth = 6;        // splitContainer2 is the third control in the tab order.        splitContainer2.TabIndex = 2;        splitContainer2.Text = "splitContainer2";        // This splitter panel contains the top ListView control.        splitContainer2.Panel1.Controls.Add(listView1);        splitContainer2.Panel1.Name = "splitterPanel3";        // This splitter panel contains the bottom ListView control.        splitContainer2.Panel2.Controls.Add(listView2);        splitContainer2.Panel2.Name = "splitterPanel4";        // This ListView control is in the top panel of splitContainer2.        listView1.Dock = System.Windows.Forms.DockStyle.Fill;        listView1.Location = new System.Drawing.Point(0, 0);        listView1.Name = "listView1";        listView1.Size = new System.Drawing.Size(207, 125);        // listView1 is the fourth control in the tab order.        listView1.TabIndex = 3;        // This ListView control is in the bottom panel of splitContainer2.        listView2.Dock = System.Windows.Forms.DockStyle.Fill;        listView2.Location = new System.Drawing.Point(0, 0);        listView2.Name = "listView2";        listView2.Size = new System.Drawing.Size(207, 142);        // listView2 is the fifth control in the tab order.        listView2.TabIndex = 4;        // These are basic properties of the form.        ClientSize = new System.Drawing.Size(292, 273);        Controls.Add(splitContainer1);        Name = "Form1";        Text = "Form1";        splitContainer1.ResumeLayout(false);        splitContainer2.ResumeLayout(false);        ResumeLayout(false);    }    [STAThread]    static void Main()    {        Application.Run(new Form1());    }    private void splitContainer1_SplitterMoving(System.Object sender, System.Windows.Forms.SplitterCancelEventArgs e)    {        // As the splitter moves, change the cursor type.        Cursor.Current = System.Windows.Forms.Cursors.NoMoveVert;    }    private void splitContainer1_SplitterMoved(System.Object sender, System.Windows.Forms.SplitterEventArgs e)    {        // When the splitter stops moving, change the cursor back to the default.        Cursor.Current=System.Windows.Forms.Cursors.Default;    }}
' Compile this example using the following command line:' vbc basicsplitcontainer.vb /r:System.Drawing.dll /r:System.Windows.Forms.dll /r:System.dll /r:System.Data.dllImports System.DrawingImports System.CollectionsImports System.ComponentModelImports System.Windows.FormsImports System.DataPublic Class Form1    Inherits System.Windows.Forms.Form    Private WithEvents splitContainer1 As System.Windows.Forms.SplitContainer    Private treeView1 As System.Windows.Forms.TreeView    Private splitContainer2 As System.Windows.Forms.SplitContainer    Private listView2 As System.Windows.Forms.ListView    Private listView1 As System.Windows.Forms.ListView       Public Sub New()        InitializeComponent()    End Sub           Private Sub InitializeComponent()        splitContainer1 = New System.Windows.Forms.SplitContainer()        treeView1 = New System.Windows.Forms.TreeView()        splitContainer2 = New System.Windows.Forms.SplitContainer()        listView1 = New System.Windows.Forms.ListView()        listView2 = New System.Windows.Forms.ListView()        splitContainer1.SuspendLayout()        splitContainer2.SuspendLayout()        SuspendLayout()        ' Basic SplitContainer properties.        ' This is a vertical splitter that moves in 10-pixel increments.        ' This splitter needs no explicit Orientation property because Vertical is the default.        splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill        splitContainer1.ForeColor = System.Drawing.SystemColors.Control        splitContainer1.Location = New System.Drawing.Point(0, 0)        splitContainer1.Name = "splitContainer1"        ' You can drag the splitter no nearer than 30 pixels from the left edge of the container.        splitContainer1.Panel1MinSize = 30        ' You can drag the splitter no nearer than 20 pixels from the right edge of the container.        splitContainer1.Panel2MinSize = 20        splitContainer1.Size = New System.Drawing.Size(292, 273)        splitContainer1.SplitterDistance = 79        ' This splitter moves in 10-pixel increments.        splitContainer1.SplitterIncrement = 10        splitContainer1.SplitterWidth = 6        ' splitContainer1 is the first control in the tab order.        splitContainer1.TabIndex = 0        splitContainer1.Text = "splitContainer1"                  ' Add a TreeView control to the left panel.        splitContainer1.Panel1.BackColor = System.Drawing.SystemColors.Control        ' Add a TreeView control to Panel1.        splitContainer1.Panel1.Controls.Add(treeView1)        splitContainer1.Panel1.Name = "splitterPanel1"        ' Controls placed on Panel1 support right-to-left fonts.        splitContainer1.Panel1.RightToLeft = System.Windows.Forms.RightToLeft.Yes        ' Add a SplitContainer to the right panel.        splitContainer1.Panel2.Controls.Add(splitContainer2)        splitContainer1.Panel2.Name = "splitterPanel2"                  ' This TreeView control is in Panel1 of splitContainer1.        treeView1.Dock = System.Windows.Forms.DockStyle.Fill        treeView1.ForeColor = System.Drawing.SystemColors.InfoText        treeView1.ImageIndex = - 1        treeView1.Location = New System.Drawing.Point(0, 0)        treeView1.Name = "treeView1"        treeView1.SelectedImageIndex = - 1        treeView1.Size = New System.Drawing.Size(79, 273)        ' treeView1 is the second control in the tab order.        treeView1.TabIndex = 1                  ' Basic SplitContainer properties.        ' This is a horizontal splitter whose top and bottom panels are ListView controls. The top panel is fixed.        splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill        ' The top panel remains the same size when the form is resized.        splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel1        splitContainer2.Location = New System.Drawing.Point(0, 0)        splitContainer2.Name = "splitContainer2"        ' Create the horizontal splitter.        splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal        splitContainer2.Size = New System.Drawing.Size(207, 273)        splitContainer2.SplitterDistance = 125        splitContainer2.SplitterWidth = 6        ' splitContainer2 is the third control in the tab order.        splitContainer2.TabIndex = 2        splitContainer2.Text = "splitContainer2"        ' This splitter panel contains the top ListView control.        splitContainer2.Panel1.Controls.Add(listView1)        splitContainer2.Panel1.Name = "splitterPanel3"                  ' This splitter panel contains the bottom ListView control.        splitContainer2.Panel2.Controls.Add(listView2)        splitContainer2.Panel2.Name = "splitterPanel4"                  ' This ListView control is in the top panel of splitContainer2.        listView1.Dock = System.Windows.Forms.DockStyle.Fill        listView1.Location = New System.Drawing.Point(0, 0)        listView1.Name = "listView1"        listView1.Size = New System.Drawing.Size(207, 125)        ' listView1 is the fourth control in the tab order.        listView1.TabIndex = 3                  ' This ListView control is in the bottom panel of splitContainer2.        listView2.Dock = System.Windows.Forms.DockStyle.Fill        listView2.Location = New System.Drawing.Point(0, 0)        listView2.Name = "listView2"        listView2.Size = New System.Drawing.Size(207, 142)        ' listView2 is the fifth control in the tab order.        listView2.TabIndex = 4                  ' These are basic properties of the form.        ClientSize = New System.Drawing.Size(292, 273)        Controls.Add(splitContainer1)        Name = "Form1"        Text = "Form1"        splitContainer1.ResumeLayout(False)        splitContainer2.ResumeLayout(False)        ResumeLayout(False)    End Sub              <STAThread()>  _Shared Sub Main()    Application.Run(New Form1())End Sub    Private Sub splitContainer1_SplitterMoving(sender As System.Object, e As System.Windows.Forms.SplitterCancelEventArgs) Handles splitContainer1.SplitterMoving    ' As the splitter moves, change the cursor type.    Cursor.Current = System.Windows.Forms.Cursors.NoMoveVertEnd Sub    Private Sub splitContainer1_SplitterMoved(sender As System.Object, e As System.Windows.Forms.SplitterEventArgs) Handles splitContainer1.SplitterMoved    ' When the splitter stops moving, change the cursor back to the default.    Cursor.Current = System.Windows.Forms.Cursors.DefaultEnd SubEnd Class

Remarks

You can add controls to the two resizable panels, and you can add otherSplitContainer controls to existingSplitContainer panels to create many resizable display areas.

Use theSplitContainer control to divide the display area of a container (such as aForm) and allow the user to resize controls that are added to theSplitContainer panels. When the user passes the mouse pointer over the splitter, the cursor changes to indicate that the controls inside theSplitContainer control can be resized.

Note

Previous versions of the .NET Framework only support theSplitter control.

SplitContainer also eases control placement at design time. For example, to create a window similar to Windows Explorer, add aSplitContainer control to aForm and set itsDock property toDockStyle.Fill. Add aTreeView control to theForm and set itsDock property toDockStyle.Fill. To complete the layout, add aListView control and set itsDock property toDockStyle.Fill to have theListView occupy the remaining space on theForm. At run time, the user can then resize the width of both controls using the splitter. Use theFixedPanel property to specify that a control should not be resized along with theForm or other container.

UseSplitterDistance to specify where the splitter starts on your form. UseSplitterIncrement to specify how many pixels the splitter moves at a time. The default forSplitterIncrement is one pixel.

UsePanel1MinSize andPanel2MinSize to specify how close the splitter bar can be moved to the outside edge of aSplitContainer panel. The default minimum size of a panel is 25 pixels.

Use theOrientation property to specify horizontal orientation. The default orientation of theSplitContainer is vertical.

Use theBorderStyle property to specify the border style of theSplitContainer and coordinate its border style with the border style of controls that you add to theSplitContainer.

Constructors

NameDescription
SplitContainer()

Initializes a new instance of theSplitContainer class.

Fields

NameDescription
ScrollStateAutoScrolling

Determines the value of theAutoScroll property.

(Inherited fromScrollableControl)
ScrollStateFullDrag

Determines whether the user has enabled full window drag.

(Inherited fromScrollableControl)
ScrollStateHScrollVisible

Determines whether the value of theHScroll property is set totrue.

(Inherited fromScrollableControl)
ScrollStateUserHasScrolled

Determines whether the user had scrolled through theScrollableControl control.

(Inherited fromScrollableControl)
ScrollStateVScrollVisible

Determines whether the value of theVScroll property is set totrue.

(Inherited fromScrollableControl)

Properties

NameDescription
AccessibilityObject

Gets theAccessibleObject assigned to the control.

(Inherited fromControl)
AccessibleDefaultActionDescription

Gets or sets the default action description of the control for use by accessibility client applications.

(Inherited fromControl)
AccessibleDescription

Gets or sets the description of the control used by accessibility client applications.

(Inherited fromControl)
AccessibleName

Gets or sets the name of the control used by accessibility client applications.

(Inherited fromControl)
AccessibleRole

Gets or sets the accessible role of the control.

(Inherited fromControl)
ActiveControl

Gets or sets the active control on the container control.

(Inherited fromContainerControl)
AllowDrop

Gets or sets a value indicating whether the control can accept data that the user drags onto it.

(Inherited fromControl)
Anchor

Gets or sets the edges of the container to which a control is bound and determines how a control is resized with its parent.

(Inherited fromControl)
AutoScaleDimensions

Gets or sets the dimensions that the control was designed to.

(Inherited fromContainerControl)
AutoScaleFactor

Gets the scaling factor between the current and design-time automatic scaling dimensions.

(Inherited fromContainerControl)
AutoScaleMode

Gets or sets the automatic scaling mode of the control.

(Inherited fromContainerControl)
AutoScroll

When overridden in a derived class, gets or sets a value indicating whether scroll bars automatically appear if controls are placed outside theSplitContainer client area. This property is not relevant to this class.

AutoScrollMargin

Gets or sets the size of the auto-scroll margin. This property is not relevant to this class. This property is not relevant to this class.

AutoScrollMinSize

Gets or sets the minimum size of the scroll bar. This property is not relevant to this class.

AutoScrollOffset

This property is not relevant to this class.

AutoScrollPosition

This property is not relevant to this class.

AutoSize

Gets or sets a value indicating whether theSplitContainer is automatically resized to display its entire contents. This property is not relevant to this class.

AutoValidate

Gets or sets a value that indicates whether controls in this container will be automatically validated when the focus changes.

(Inherited fromContainerControl)
BackColor

Gets or sets the background color for the control.

(Inherited fromControl)
BackgroundImage

Gets or sets the background image displayed in the control.

BackgroundImageLayout

This property is not relevant to this class.

BindingContext

Gets or sets theBindingContext for theSplitContainer.

BorderStyle

Gets or sets the style of border for theSplitContainer.

Bottom

Gets the distance, in pixels, between the bottom edge of the control and the top edge of its container's client area.

(Inherited fromControl)
Bounds

Gets or sets the size and location of the control including its nonclient elements, in pixels, relative to the parent control.

(Inherited fromControl)
CanEnableIme

Gets a value indicating whether theImeMode property can be set to an active value, to enable IME support.

(Inherited fromContainerControl)
CanFocus

Gets a value indicating whether the control can receive focus.

(Inherited fromControl)
CanRaiseEvents

Determines if events can be raised on the control.

(Inherited fromControl)
CanSelect

Gets a value indicating whether the control can be selected.

(Inherited fromControl)
Capture

Gets or sets a value indicating whether the control has captured the mouse.

(Inherited fromControl)
CausesValidation

Gets or sets a value indicating whether the control causes validation to be performed on any controls that require validation when it receives focus.

(Inherited fromControl)
ClientRectangle

Gets the rectangle that represents the client area of the control.

(Inherited fromControl)
ClientSize

Gets or sets the height and width of the client area of the control.

(Inherited fromControl)
CompanyName

Gets the name of the company or creator of the application containing the control.

(Inherited fromControl)
Container

Gets theIContainer that contains theComponent.

(Inherited fromComponent)
ContainsFocus

Gets a value indicating whether the control, or one of its child controls, currently has the input focus.

(Inherited fromControl)
ContextMenu
Obsolete.

Gets or sets the shortcut menu associated with the control.

(Inherited fromControl)
ContextMenuStrip

Gets or sets theContextMenuStrip associated with this control.

(Inherited fromControl)
Controls

Gets a collection of child controls. This property is not relevant to this class.

Created

Gets a value indicating whether the control has been created.

(Inherited fromControl)
CreateParams

Gets the required creation parameters when the control handle is created.

(Inherited fromContainerControl)
CurrentAutoScaleDimensions

Gets the current run-time dimensions of the screen.

(Inherited fromContainerControl)
Cursor

Gets or sets the cursor that is displayed when the mouse pointer is over the control.

(Inherited fromControl)
DataBindings

Gets the data bindings for the control.

(Inherited fromControl)
DataContext

Gets or sets the data context for the purpose of data binding.This is an ambient property.

(Inherited fromControl)
DefaultCursor

Gets or sets the default cursor for the control.

(Inherited fromControl)
DefaultImeMode

Gets the default Input Method Editor (IME) mode supported by the control.

(Inherited fromControl)
DefaultMargin

Gets the space, in pixels, that is specified by default between controls.

(Inherited fromControl)
DefaultMaximumSize

Gets the length and height, in pixels, that is specified as the default maximum size of a control.

(Inherited fromControl)
DefaultMinimumSize

Gets the length and height, in pixels, that is specified as the default minimum size of a control.

(Inherited fromControl)
DefaultPadding

Gets the default internal spacing, in pixels, of the contents of a control.

(Inherited fromControl)
DefaultSize

Gets the default size of theSplitContainer.

DesignMode

Gets a value that indicates whether theComponent is currently in design mode.

(Inherited fromComponent)
DeviceDpi

Gets the DPI value for the display device where the control is currently being displayed.

(Inherited fromControl)
DisplayRectangle

Gets the rectangle that represents the virtual display area of the control.

(Inherited fromScrollableControl)
Disposing

Gets a value indicating whether the baseControl class is in the process of disposing.

(Inherited fromControl)
Dock

Gets or sets whichSplitContainer borders are attached to the edges of the container.

DockPadding

Gets the dock padding settings for all edges of the control.

(Inherited fromScrollableControl)
DoubleBuffered

Gets or sets a value indicating whether this control should redraw its surface using a secondary buffer to reduce or prevent flicker.

(Inherited fromControl)
Enabled

Gets or sets a value indicating whether the control can respond to user interaction.

(Inherited fromControl)
Events

Gets the list of event handlers that are attached to thisComponent.

(Inherited fromComponent)
FixedPanel

Gets or sets whichSplitContainer panel remains the same size when the container is resized.

Focused

Gets a value indicating whether the control has input focus.

(Inherited fromControl)
Font

Gets or sets the font of the text displayed by the control.

(Inherited fromControl)
FontHeight

Gets or sets the height of the font of the control.

(Inherited fromControl)
ForeColor

Gets or sets the foreground color of the control.

(Inherited fromControl)
Handle

Gets the window handle that the control is bound to.

(Inherited fromControl)
HasChildren

Gets a value indicating whether the control contains one or more child controls.

(Inherited fromControl)
Height

Gets or sets the height of the control.

(Inherited fromControl)
HorizontalScroll

Gets the characteristics associated with the horizontal scroll bar.

(Inherited fromScrollableControl)
HScroll

Gets or sets a value indicating whether the horizontal scroll bar is visible.

(Inherited fromScrollableControl)
ImeMode

Gets or sets the Input Method Editor (IME) mode of the control.

(Inherited fromControl)
ImeModeBase

Gets or sets the IME mode of a control.

(Inherited fromControl)
InvokeRequired

Gets a value indicating whether the caller must call an invoke method when making method calls to the control because the caller is on a different thread than the one the control was created on.

(Inherited fromControl)
IsAccessible

Gets or sets a value indicating whether the control is visible to accessibility applications.

(Inherited fromControl)
IsAncestorSiteInDesignMode

Indicates if one of the Ancestors of this control is sited and that site in DesignMode. This property is read-only.

(Inherited fromControl)
IsDisposed

Gets a value indicating whether the control has been disposed of.

(Inherited fromControl)
IsHandleCreated

Gets a value indicating whether the control has a handle associated with it.

(Inherited fromControl)
IsMirrored

Gets a value indicating whether the control is mirrored.

(Inherited fromControl)
IsSplitterFixed

Gets or sets a value indicating whether the splitter is fixed or movable.

LayoutEngine

Gets a cached instance of the control's layout engine.

(Inherited fromControl)
Left

Gets or sets the distance, in pixels, between the left edge of the control and the left edge of its container's client area.

(Inherited fromControl)
Location

Gets or sets the coordinates of the upper-left corner of the control relative to the upper-left corner of its container.

(Inherited fromControl)
Margin

Gets or sets the space between controls.

(Inherited fromControl)
MaximumSize

Gets or sets the size that is the upper limit thatGetPreferredSize(Size) can specify.

(Inherited fromControl)
MinimumSize

Gets or sets the size that is the lower limit thatGetPreferredSize(Size) can specify.

(Inherited fromControl)
Name

Gets or sets the name of the control.

(Inherited fromControl)
Orientation

Gets or sets a value indicating the horizontal or vertical orientation of theSplitContainer panels.

Padding

Gets or sets the interior spacing, in pixels, between the edges of aSplitterPanel and its contents. This property is not relevant to this class.

Panel1

Gets the left or top panel of theSplitContainer, depending onOrientation.

Panel1Collapsed

Gets or sets a value determining whetherPanel1 is collapsed or expanded.

Panel1MinSize

Gets or sets the minimum distance in pixels of the splitter from the left or top edge ofPanel1.

Panel2

Gets the right or bottom panel of theSplitContainer, depending onOrientation.

Panel2Collapsed

Gets or sets a value determining whetherPanel2 is collapsed or expanded.

Panel2MinSize

Gets or sets the minimum distance in pixels of the splitter from the right or bottom edge ofPanel2.

Parent

Gets or sets the parent container of the control.

(Inherited fromControl)
ParentForm

Gets the form that the container control is assigned to.

(Inherited fromContainerControl)
PreferredSize

Gets the size of a rectangular area into which the control can fit.

(Inherited fromControl)
ProductName

Gets the product name of the assembly containing the control.

(Inherited fromControl)
ProductVersion

Gets the version of the assembly containing the control.

(Inherited fromControl)
RecreatingHandle

Gets a value indicating whether the control is currently re-creating its handle.

(Inherited fromControl)
Region

Gets or sets the window region associated with the control.

(Inherited fromControl)
RenderRightToLeft
Obsolete.
Obsolete.

This property is now obsolete.

(Inherited fromControl)
ResizeRedraw

Gets or sets a value indicating whether the control redraws itself when resized.

(Inherited fromControl)
Right

Gets the distance, in pixels, between the right edge of the control and the left edge of its container's client area.

(Inherited fromControl)
RightToLeft

Gets or sets a value indicating whether control's elements are aligned to support locales using right-to-left fonts.

(Inherited fromControl)
ScaleChildren

Gets a value that determines the scaling of child controls.

(Inherited fromControl)
ShowFocusCues

Gets a value indicating whether the control should display focus rectangles.

(Inherited fromControl)
ShowKeyboardCues

Gets a value indicating whether the user interface is in the appropriate state to show or hide keyboard accelerators.

(Inherited fromControl)
Site

Gets or sets the site of the control.

(Inherited fromControl)
Size

Gets or sets the height and width of the control.

(Inherited fromControl)
SplitterDistance

Gets or sets the location of the splitter, in pixels, from the left or top edge of theSplitContainer.

SplitterIncrement

Gets or sets a value representing the increment of splitter movement in pixels.

SplitterRectangle

Gets the size and location of the splitter relative to theSplitContainer.

SplitterWidth

Gets or sets the width of the splitter in pixels.

TabIndex

Gets or sets the tab order of the control within its container.

(Inherited fromControl)
TabStop

Gets or sets a value indicating whether the user can give the focus to the splitter using the TAB key.

Tag

Gets or sets the object that contains data about the control.

(Inherited fromControl)
Text

This property is not relevant to this class.

Top

Gets or sets the distance, in pixels, between the top edge of the control and the top edge of its container's client area.

(Inherited fromControl)
TopLevelControl

Gets the parent control that is not parented by another Windows Forms control. Typically, this is the outermostForm that the control is contained in.

(Inherited fromControl)
UseWaitCursor

Gets or sets a value indicating whether to use the wait cursor for the current control and all child controls.

(Inherited fromControl)
VerticalScroll

Gets the characteristics associated with the vertical scroll bar.

(Inherited fromScrollableControl)
Visible

Gets or sets a value indicating whether the control and all its child controls are displayed.

(Inherited fromControl)
VScroll

Gets or sets a value indicating whether the vertical scroll bar is visible.

(Inherited fromScrollableControl)
Width

Gets or sets the width of the control.

(Inherited fromControl)
WindowTarget

This property is not relevant for this class.

(Inherited fromControl)

Methods

NameDescription
AccessibilityNotifyClients(AccessibleEvents, Int32, Int32)

Notifies the accessibility client applications of the specifiedAccessibleEvents for the specified child control .

(Inherited fromControl)
AccessibilityNotifyClients(AccessibleEvents, Int32)

Notifies the accessibility client applications of the specifiedAccessibleEvents for the specified child control.

(Inherited fromControl)
AdjustFormScrollbars(Boolean)

Adjusts the scroll bars on the container based on the current control positions and the control currently selected.

(Inherited fromContainerControl)
BeginInit()

Signals the object that initialization is started.

BeginInvoke(Action)

Executes the specified delegate asynchronously on the thread that the control's underlying handle was created on.

(Inherited fromControl)
BeginInvoke(Delegate, Object[])

Executes the specified delegate asynchronously with the specified arguments, on the thread that the control's underlying handle was created on.

(Inherited fromControl)
BeginInvoke(Delegate)

Executes the specified delegate asynchronously on the thread that the control's underlying handle was created on.

(Inherited fromControl)
BringToFront()

Brings the control to the front of the z-order.

(Inherited fromControl)
Contains(Control)

Retrieves a value indicating whether the specified control is a child of the control.

(Inherited fromControl)
CreateAccessibilityInstance()
CreateAccessibilityInstance()

Creates a new accessibility object for the control.

(Inherited fromControl)
CreateControl()

Forces the creation of the visible control, including the creation of the handle and any visible child controls.

(Inherited fromControl)
CreateControlsInstance()

Creates a new instance of the control collection for the control.

CreateGraphics()

Creates theGraphics for the control.

(Inherited fromControl)
CreateHandle()

Creates a handle for the control.

(Inherited fromControl)
CreateObjRef(Type)

Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.

(Inherited fromMarshalByRefObject)
DefWndProc(Message)

Sends the specified message to the default window procedure.

(Inherited fromControl)
DestroyHandle()

Destroys the handle associated with the control.

(Inherited fromControl)
Dispose()

Releases all resources used by theComponent.

(Inherited fromComponent)
Dispose(Boolean)

Releases the unmanaged resources used by theControl and its child controls and optionally releases the managed resources.

(Inherited fromContainerControl)
DoDragDrop(Object, DragDropEffects, Bitmap, Point, Boolean)

Begins a drag operation.

(Inherited fromControl)
DoDragDrop(Object, DragDropEffects)

Begins a drag-and-drop operation.

(Inherited fromControl)
DoDragDropAsJson<T>(T, DragDropEffects, Bitmap, Point, Boolean)(Inherited fromControl)
DoDragDropAsJson<T>(T, DragDropEffects)(Inherited fromControl)
DrawToBitmap(Bitmap, Rectangle)

Supports rendering to the specified bitmap.

(Inherited fromControl)
EndInit()

Signals the object that initialization is complete.

EndInvoke(IAsyncResult)

Retrieves the return value of the asynchronous operation represented by theIAsyncResult passed.

(Inherited fromControl)
Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited fromObject)
FindForm()

Retrieves the form that the control is on.

(Inherited fromControl)
Focus()

Sets input focus to the control.

(Inherited fromControl)
GetAccessibilityObjectById(Int32)

Retrieves the specifiedAccessibleObject.

(Inherited fromControl)
GetAutoSizeMode()

Retrieves a value indicating how a control will behave when itsAutoSize property is enabled.

(Inherited fromControl)
GetChildAtPoint(Point, GetChildAtPointSkip)

Retrieves the child control that is located at the specified coordinates, specifying whether to ignore child controls of a certain type.

(Inherited fromControl)
GetChildAtPoint(Point)

Retrieves the child control that is located at the specified coordinates.

(Inherited fromControl)
GetContainerControl()

Returns the nextContainerControl up the control's chain of parent controls.

(Inherited fromControl)
GetHashCode()

Serves as the default hash function.

(Inherited fromObject)
GetLifetimeService()
Obsolete.

Retrieves the current lifetime service object that controls the lifetime policy for this instance.

(Inherited fromMarshalByRefObject)
GetNextControl(Control, Boolean)

Retrieves the next control forward or back in the tab order of child controls.

(Inherited fromControl)
GetPreferredSize(Size)

Retrieves the size of a rectangular area into which a control can be fitted.

(Inherited fromControl)
GetScaledBounds(Rectangle, SizeF, BoundsSpecified)

Retrieves the bounds within which the control is scaled.

(Inherited fromControl)
GetScrollState(Int32)

Determines whether the specified flag has been set.

(Inherited fromScrollableControl)
GetService(Type)

Returns an object that represents a service provided by theComponent or by itsContainer.

(Inherited fromComponent)
GetStyle(ControlStyles)

Retrieves the value of the specified control style bit for the control.

(Inherited fromControl)
GetTopLevel()

Determines if the control is a top-level control.

(Inherited fromControl)
GetType()

Gets theType of the current instance.

(Inherited fromObject)
Hide()

Conceals the control from the user.

(Inherited fromControl)
InitializeLifetimeService()
Obsolete.

Obtains a lifetime service object to control the lifetime policy for this instance.

(Inherited fromMarshalByRefObject)
InitLayout()

Called after the control has been added to another container.

(Inherited fromControl)
Invalidate()

Invalidates the entire surface of the control and causes the control to be redrawn.

(Inherited fromControl)
Invalidate(Boolean)

Invalidates a specific region of the control and causes a paint message to be sent to the control. Optionally, invalidates the child controls assigned to the control.

(Inherited fromControl)
Invalidate(Rectangle, Boolean)

Invalidates the specified region of the control (adds it to the control's update region, which is the area that will be repainted at the next paint operation), and causes a paint message to be sent to the control. Optionally, invalidates the child controls assigned to the control.

(Inherited fromControl)
Invalidate(Rectangle)

Invalidates the specified region of the control (adds it to the control's update region, which is the area that will be repainted at the next paint operation), and causes a paint message to be sent to the control.

(Inherited fromControl)
Invalidate(Region, Boolean)

Invalidates the specified region of the control (adds it to the control's update region, which is the area that will be repainted at the next paint operation), and causes a paint message to be sent to the control. Optionally, invalidates the child controls assigned to the control.

(Inherited fromControl)
Invalidate(Region)

Invalidates the specified region of the control (adds it to the control's update region, which is the area that will be repainted at the next paint operation), and causes a paint message to be sent to the control.

(Inherited fromControl)
Invoke(Action)

Executes the specified delegate on the thread that owns the control's underlying window handle.

(Inherited fromControl)
Invoke(Delegate, Object[])

Executes the specified delegate, on the thread that owns the control's underlying window handle, with the specified list of arguments.

(Inherited fromControl)
Invoke(Delegate)

Executes the specified delegate on the thread that owns the control's underlying window handle.

(Inherited fromControl)
Invoke<T>(Func<T>)

Executes the specified delegate on the thread that owns the control's underlying window handle.

(Inherited fromControl)
InvokeAsync(Action, CancellationToken)

Invokes the specified synchronous callback asynchronously on the thread that owns the control's handle.

(Inherited fromControl)
InvokeAsync(Func<CancellationToken,ValueTask>, CancellationToken)

Executes the specified asynchronous callback on the thread that owns the control's handle asynchronously.

(Inherited fromControl)
InvokeAsync<T>(Func<CancellationToken,ValueTask<T>>, CancellationToken)

Executes the specified asynchronous callback on the thread that owns the control's handle.

(Inherited fromControl)
InvokeAsync<T>(Func<T>, CancellationToken)

Invokes the specified synchronous callback asynchronously on the thread that owns the control's handle.

(Inherited fromControl)
InvokeGotFocus(Control, EventArgs)

Raises theGotFocus event for the specified control.

(Inherited fromControl)
InvokeLostFocus(Control, EventArgs)

Raises theLostFocus event for the specified control.

(Inherited fromControl)
InvokeOnClick(Control, EventArgs)

Raises theClick event for the specified control.

(Inherited fromControl)
InvokePaint(Control, PaintEventArgs)

Raises thePaint event for the specified control.

(Inherited fromControl)
InvokePaintBackground(Control, PaintEventArgs)

Raises thePaintBackground event for the specified control.

(Inherited fromControl)
IsInputChar(Char)

Determines if a character is an input character that the control recognizes.

(Inherited fromControl)
IsInputKey(Keys)

Determines whether the specified key is a regular input key or a special key that requires preprocessing.

(Inherited fromControl)
LogicalToDeviceUnits(Int32)

Converts a Logical DPI value to its equivalent DeviceUnit DPI value.

(Inherited fromControl)
LogicalToDeviceUnits(Size)

Transforms a size from logical to device units by scaling it for the current DPI and rounding down to the nearest integer value for width and height.

(Inherited fromControl)
MemberwiseClone()

Creates a shallow copy of the currentObject.

(Inherited fromObject)
MemberwiseClone(Boolean)

Creates a shallow copy of the currentMarshalByRefObject object.

(Inherited fromMarshalByRefObject)
NotifyInvalidate(Rectangle)

Raises theInvalidated event with a specified region of the control to invalidate.

(Inherited fromControl)
OnAutoSizeChanged(EventArgs)

Raises theAutoSizeChanged event.

(Inherited fromControl)
OnAutoValidateChanged(EventArgs)

Raises theAutoValidateChanged event.

(Inherited fromContainerControl)
OnBackColorChanged(EventArgs)

Raises theBackColorChanged event.

(Inherited fromControl)
OnBackgroundImageChanged(EventArgs)

Raises theBackgroundImageChanged event.

(Inherited fromControl)
OnBackgroundImageLayoutChanged(EventArgs)

Raises theBackgroundImageLayoutChanged event.

(Inherited fromControl)
OnBindingContextChanged(EventArgs)

Raises theBindingContextChanged event.

(Inherited fromControl)
OnCausesValidationChanged(EventArgs)

Raises theCausesValidationChanged event.

(Inherited fromControl)
OnChangeUICues(UICuesEventArgs)

Raises theChangeUICues event.

(Inherited fromControl)
OnClick(EventArgs)

Raises theClick event.

(Inherited fromControl)
OnClientSizeChanged(EventArgs)

Raises theClientSizeChanged event.

(Inherited fromControl)
OnContextMenuChanged(EventArgs)
Obsolete.

Raises theContextMenuChanged event.

(Inherited fromControl)
OnContextMenuStripChanged(EventArgs)

Raises theContextMenuStripChanged event.

(Inherited fromControl)
OnControlAdded(ControlEventArgs)

Raises theControlAdded event.

(Inherited fromControl)
OnControlRemoved(ControlEventArgs)

Raises theControlRemoved event.

(Inherited fromControl)
OnCreateControl()

Raises theCreateControl() method.

(Inherited fromContainerControl)
OnCursorChanged(EventArgs)

Raises theCursorChanged event.

(Inherited fromControl)
OnDataContextChanged(EventArgs)(Inherited fromControl)
OnDockChanged(EventArgs)

Raises theDockChanged event.

(Inherited fromControl)
OnDoubleClick(EventArgs)

Raises theDoubleClick event.

(Inherited fromControl)
OnDpiChangedAfterParent(EventArgs)

Raises theDpiChangedAfterParent event.

(Inherited fromControl)
OnDpiChangedBeforeParent(EventArgs)

Raises theDpiChangedBeforeParent event.

(Inherited fromControl)
OnDragDrop(DragEventArgs)

Raises theDragDrop event.

(Inherited fromControl)
OnDragEnter(DragEventArgs)

Raises theDragEnter event.

(Inherited fromControl)
OnDragLeave(EventArgs)

Raises theDragLeave event.

(Inherited fromControl)
OnDragOver(DragEventArgs)

Raises theDragOver event.

(Inherited fromControl)
OnEnabledChanged(EventArgs)

Raises theEnabledChanged event.

(Inherited fromControl)
OnEnter(EventArgs)

Raises theEnter event.

(Inherited fromControl)
OnFontChanged(EventArgs)

Raises theFontChanged event.

(Inherited fromContainerControl)
OnForeColorChanged(EventArgs)

Raises theForeColorChanged event.

(Inherited fromControl)
OnGiveFeedback(GiveFeedbackEventArgs)

Raises theGiveFeedback event.

(Inherited fromControl)
OnGotFocus(EventArgs)

Raises theGotFocus event.

OnHandleCreated(EventArgs)

Raises theHandleCreated event.

(Inherited fromControl)
OnHandleDestroyed(EventArgs)

Raises theHandleDestroyed event.

(Inherited fromControl)
OnHelpRequested(HelpEventArgs)

Raises theHelpRequested event.

(Inherited fromControl)
OnImeModeChanged(EventArgs)

Raises theImeModeChanged event.

(Inherited fromControl)
OnInvalidated(InvalidateEventArgs)

Raises theInvalidated event.

(Inherited fromControl)
OnKeyDown(KeyEventArgs)

Raises theKeyDown event.

OnKeyPress(KeyPressEventArgs)

Raises theKeyPress event.

(Inherited fromControl)
OnKeyUp(KeyEventArgs)

Raises theKeyUp event.

OnLayout(LayoutEventArgs)

Raises theLayout event.

OnLeave(EventArgs)

Raises theLeave event.

(Inherited fromControl)
OnLocationChanged(EventArgs)

Raises theLocationChanged event.

(Inherited fromControl)
OnLostFocus(EventArgs)

Raises theLostFocus event.

OnMarginChanged(EventArgs)

Raises theMarginChanged event.

(Inherited fromControl)
OnMouseCaptureChanged(EventArgs)

Raises theMouseCaptureChanged event.

OnMouseClick(MouseEventArgs)

Raises theMouseClick event.

(Inherited fromControl)
OnMouseDoubleClick(MouseEventArgs)

Raises theMouseDoubleClick event.

(Inherited fromControl)
OnMouseDown(MouseEventArgs)

Raises theMouseDown event.

OnMouseEnter(EventArgs)

Raises theMouseEnter event.

(Inherited fromControl)
OnMouseHover(EventArgs)

Raises theMouseHover event.

(Inherited fromControl)
OnMouseLeave(EventArgs)

Raises theMouseLeave event.

OnMouseMove(MouseEventArgs)

Raises theMouseMove event.

OnMouseUp(MouseEventArgs)

Raises theMouseUp event.

OnMouseWheel(MouseEventArgs)

Raises theMouseWheel event.

(Inherited fromScrollableControl)
OnMove(EventArgs)

Raises theMove event.

OnNotifyMessage(Message)

Notifies the control of Windows messages.

(Inherited fromControl)
OnPaddingChanged(EventArgs)

Raises thePaddingChanged event.

(Inherited fromScrollableControl)
OnPaint(PaintEventArgs)

Raises thePaint event.

OnPaintBackground(PaintEventArgs)

Paints the background of the control.

(Inherited fromScrollableControl)
OnParentBackColorChanged(EventArgs)

Raises theBackColorChanged event when theBackColor property value of the control's container changes.

(Inherited fromControl)
OnParentBackgroundImageChanged(EventArgs)

Raises theBackgroundImageChanged event when theBackgroundImage property value of the control's container changes.

(Inherited fromControl)
OnParentBindingContextChanged(EventArgs)

Raises theBindingContextChanged event when theBindingContext property value of the control's container changes.

(Inherited fromControl)
OnParentChanged(EventArgs)

Raises theParentChanged event.

(Inherited fromContainerControl)
OnParentCursorChanged(EventArgs)

Raises theCursorChanged event.

(Inherited fromControl)
OnParentDataContextChanged(EventArgs)(Inherited fromControl)
OnParentEnabledChanged(EventArgs)

Raises theEnabledChanged event when theEnabled property value of the control's container changes.

(Inherited fromControl)
OnParentFontChanged(EventArgs)

Raises theFontChanged event when theFont property value of the control's container changes.

(Inherited fromControl)
OnParentForeColorChanged(EventArgs)

Raises theForeColorChanged event when theForeColor property value of the control's container changes.

(Inherited fromControl)
OnParentRightToLeftChanged(EventArgs)

Raises theRightToLeftChanged event when theRightToLeft property value of the control's container changes.

(Inherited fromControl)
OnParentVisibleChanged(EventArgs)

Raises theVisibleChanged event when theVisible property value of the control's container changes.

(Inherited fromControl)
OnPreviewKeyDown(PreviewKeyDownEventArgs)

Raises thePreviewKeyDown event.

(Inherited fromControl)
OnPrint(PaintEventArgs)

Raises thePaint event.

(Inherited fromControl)
OnQueryContinueDrag(QueryContinueDragEventArgs)

Raises theQueryContinueDrag event.

(Inherited fromControl)
OnRegionChanged(EventArgs)

Raises theRegionChanged event.

(Inherited fromControl)
OnResize(EventArgs)(Inherited fromContainerControl)
OnRightToLeftChanged(EventArgs)

Raises theRightToLeftChanged event.

OnScroll(ScrollEventArgs)

Raises theScroll event.

(Inherited fromScrollableControl)
OnSizeChanged(EventArgs)

Raises theSizeChanged event.

(Inherited fromControl)
OnSplitterMoved(SplitterEventArgs)

Raises theSplitterMoved event.

OnSplitterMoving(SplitterCancelEventArgs)

Raises theSplitterMoving event.

OnStyleChanged(EventArgs)

Raises theStyleChanged event.

(Inherited fromControl)
OnSystemColorsChanged(EventArgs)

Raises theSystemColorsChanged event.

(Inherited fromControl)
OnTabIndexChanged(EventArgs)

Raises theTabIndexChanged event.

(Inherited fromControl)
OnTabStopChanged(EventArgs)

Raises theTabStopChanged event.

(Inherited fromControl)
OnTextChanged(EventArgs)

Raises theTextChanged event.

(Inherited fromControl)
OnValidated(EventArgs)

Raises theValidated event.

(Inherited fromControl)
OnValidating(CancelEventArgs)

Raises theValidating event.

(Inherited fromControl)
OnVisibleChanged(EventArgs)

Raises theVisibleChanged event.

(Inherited fromScrollableControl)
PerformAutoScale()

Performs scaling of the container control and its children.

(Inherited fromContainerControl)
PerformLayout()

Forces the control to apply layout logic to all its child controls.

(Inherited fromControl)
PerformLayout(Control, String)

Forces the control to apply layout logic to all its child controls.

(Inherited fromControl)
PointToClient(Point)

Computes the location of the specified screen point into client coordinates.

(Inherited fromControl)
PointToScreen(Point)

Computes the location of the specified client point into screen coordinates.

(Inherited fromControl)
PreProcessControlMessage(Message)

Preprocesses keyboard or input messages within the message loop before they are dispatched.

(Inherited fromControl)
PreProcessMessage(Message)

Preprocesses keyboard or input messages within the message loop before they are dispatched.

(Inherited fromControl)
ProcessCmdKey(Message, Keys)

Processes a command key.

(Inherited fromContainerControl)
ProcessDialogChar(Char)

Processes a dialog character.

(Inherited fromContainerControl)
ProcessDialogKey(Keys)

Processes a dialog box key.

ProcessKeyEventArgs(Message)

Processes a key message and generates the appropriate control events.

(Inherited fromControl)
ProcessKeyMessage(Message)

Processes a keyboard message.

(Inherited fromControl)
ProcessKeyPreview(Message)

Previews a keyboard message.

(Inherited fromControl)
ProcessMnemonic(Char)

Processes a mnemonic character.

(Inherited fromContainerControl)
ProcessTabKey(Boolean)

Selects the next available control and makes it the active control.

RaiseDragEvent(Object, DragEventArgs)

Raises the appropriate drag event.

(Inherited fromControl)
RaiseKeyEvent(Object, KeyEventArgs)

Raises the appropriate key event.

(Inherited fromControl)
RaiseMouseEvent(Object, MouseEventArgs)

Raises the appropriate mouse event.

(Inherited fromControl)
RaisePaintEvent(Object, PaintEventArgs)

Raises the appropriate paint event.

(Inherited fromControl)
RecreateHandle()

Forces the re-creation of the handle for the control.

(Inherited fromControl)
RectangleToClient(Rectangle)

Computes the size and location of the specified screen rectangle in client coordinates.

(Inherited fromControl)
RectangleToScreen(Rectangle)

Computes the size and location of the specified client rectangle in screen coordinates.

(Inherited fromControl)
Refresh()

Forces the control to invalidate its client area and immediately redraw itself and any child controls.

(Inherited fromControl)
RescaleConstantsForDpi(Int32, Int32)(Inherited fromContainerControl)
ResetBackColor()

Resets theBackColor property to its default value.

(Inherited fromControl)
ResetBindings()

Causes a control bound to theBindingSource to reread all the items in the list and refresh their displayed values.

(Inherited fromControl)
ResetCursor()

Resets theCursor property to its default value.

(Inherited fromControl)
ResetFont()

Resets theFont property to its default value.

(Inherited fromControl)
ResetForeColor()

Resets theForeColor property to its default value.

(Inherited fromControl)
ResetImeMode()

Resets theImeMode property to its default value.

(Inherited fromControl)
ResetMouseEventArgs()

Resets the control to handle theMouseLeave event.

(Inherited fromControl)
ResetRightToLeft()

Resets theRightToLeft property to its default value.

(Inherited fromControl)
ResetText()

Resets theText property to its default value (Empty).

(Inherited fromControl)
ResumeLayout()

Resumes usual layout logic.

(Inherited fromControl)
ResumeLayout(Boolean)

Resumes usual layout logic, optionally forcing an immediate layout of pending layout requests.

(Inherited fromControl)
RtlTranslateAlignment(ContentAlignment)

Converts the specifiedContentAlignment to the appropriateContentAlignment to support right-to-left text.

(Inherited fromControl)
RtlTranslateAlignment(HorizontalAlignment)

Converts the specifiedHorizontalAlignment to the appropriateHorizontalAlignment to support right-to-left text.

(Inherited fromControl)
RtlTranslateAlignment(LeftRightAlignment)

Converts the specifiedLeftRightAlignment to the appropriateLeftRightAlignment to support right-to-left text.

(Inherited fromControl)
RtlTranslateContent(ContentAlignment)

Converts the specifiedContentAlignment to the appropriateContentAlignment to support right-to-left text.

(Inherited fromControl)
RtlTranslateHorizontal(HorizontalAlignment)

Converts the specifiedHorizontalAlignment to the appropriateHorizontalAlignment to support right-to-left text.

(Inherited fromControl)
RtlTranslateLeftRight(LeftRightAlignment)

Converts the specifiedLeftRightAlignment to the appropriateLeftRightAlignment to support right-to-left text.

(Inherited fromControl)
Scale(Single, Single)
Obsolete.
Obsolete.

Scales the entire control and any child controls.

(Inherited fromControl)
Scale(Single)
Obsolete.
Obsolete.

Scales the control and any child controls.

(Inherited fromControl)
Scale(SizeF)

Scales the control and all child controls by the specified scaling factor.

(Inherited fromControl)
ScaleBitmapLogicalToDevice(Bitmap)

Scales a logical bitmap value to it's equivalent device unit value when a DPI change occurs.

(Inherited fromControl)
ScaleControl(SizeF, BoundsSpecified)

Scales the location, size, padding and margin.

ScaleCore(Single, Single)

This method is not relevant for this class.

(Inherited fromScrollableControl)
ScaleMinMaxSize(Single, Single, Boolean)

Scales the size of the container'sMin andMax properties with the scale factor provided.

(Inherited fromContainerControl)
ScrollControlIntoView(Control)

Scrolls the specified child control into view on an auto-scroll enabled control.

(Inherited fromScrollableControl)
ScrollToControl(Control)

Calculates the scroll offset to the specified child control.

(Inherited fromScrollableControl)
Select()

Activates the control.

(Inherited fromControl)
Select(Boolean, Boolean)

Activates a child control. Optionally specifies the direction in the tab order to select the control from.

SelectNextControl(Control, Boolean, Boolean, Boolean, Boolean)

Activates the next control.

(Inherited fromControl)
SendToBack()

Sends the control to the back of the z-order.

(Inherited fromControl)
SetAutoScrollMargin(Int32, Int32)

Sets the size of the auto-scroll margins.

(Inherited fromScrollableControl)
SetAutoSizeMode(AutoSizeMode)

Sets a value indicating how a control will behave when itsAutoSize property is enabled.

(Inherited fromControl)
SetBounds(Int32, Int32, Int32, Int32, BoundsSpecified)

Sets the specified bounds of the control to the specified location and size.

(Inherited fromControl)
SetBounds(Int32, Int32, Int32, Int32)

Sets the bounds of the control to the specified location and size.

(Inherited fromControl)
SetBoundsCore(Int32, Int32, Int32, Int32, BoundsSpecified)

Performs the work of setting the specified bounds of this control.

SetClientSizeCore(Int32, Int32)

Sets the size of the client area of the control.

(Inherited fromControl)
SetDisplayRectLocation(Int32, Int32)

Positions the display window to the specified value.

(Inherited fromScrollableControl)
SetScrollState(Int32, Boolean)

Sets the specified scroll state flag.

(Inherited fromScrollableControl)
SetStyle(ControlStyles, Boolean)

Sets a specifiedControlStyles flag to eithertrue orfalse.

(Inherited fromControl)
SetTopLevel(Boolean)

Sets the control as the top-level control.

(Inherited fromControl)
SetVisibleCore(Boolean)

Sets the control to the specified visible state.

(Inherited fromControl)
Show()

Displays the control to the user.

(Inherited fromControl)
SizeFromClientSize(Size)

Determines the size of the entire control from the height and width of its client area.

(Inherited fromControl)
SuspendLayout()

Temporarily suspends the layout logic for the control.

(Inherited fromControl)
ToString()

Returns aString containing the name of theComponent, if any. This method should not be overridden.

(Inherited fromComponent)
Update()

Causes the control to redraw the invalidated regions within its client area.

(Inherited fromControl)
UpdateBounds()

Updates the bounds of the control with the current size and location.

(Inherited fromControl)
UpdateBounds(Int32, Int32, Int32, Int32, Int32, Int32)

Updates the bounds of the control with the specified size, location, and client size.

(Inherited fromControl)
UpdateBounds(Int32, Int32, Int32, Int32)

Updates the bounds of the control with the specified size and location.

(Inherited fromControl)
UpdateDefaultButton()

When overridden by a derived class, updates which button is the default button.

(Inherited fromContainerControl)
UpdateStyles()

Forces the assigned styles to be reapplied to the control.

(Inherited fromControl)
UpdateZOrder()

Updates the control in its parent's z-order.

(Inherited fromControl)
Validate()

Verifies the value of the control losing focus by causing theValidating andValidated events to occur, in that order.

(Inherited fromContainerControl)
Validate(Boolean)

Verifies the value of the control that is losing focus; conditionally dependent on whether automatic validation is turned on.

(Inherited fromContainerControl)
ValidateChildren()

Causes all of the child controls within a control that support validation to validate their data.

(Inherited fromContainerControl)
ValidateChildren(ValidationConstraints)

Causes all of the child controls within a control that support validation to validate their data.

(Inherited fromContainerControl)
WndProc(Message)

Processes Windows messages.

Events

NameDescription
AutoSizeChanged

Occurs when the value of theAutoSize property changes. This property is not relevant to this class.

AutoValidateChanged

Occurs when theAutoValidate property changes.

(Inherited fromContainerControl)
BackColorChanged

Occurs when the value of theBackColor property changes.

(Inherited fromControl)
BackgroundImageChanged

Occurs when theBackgroundImage property changes.

BackgroundImageLayoutChanged

Occurs when theBackgroundImageLayout property changes. This event is not relevant to this class.

BindingContextChanged

Occurs when the value of theBindingContext property changes.

(Inherited fromControl)
CausesValidationChanged

Occurs when the value of theCausesValidation property changes.

(Inherited fromControl)
ChangeUICues

Occurs when the focus or keyboard user interface (UI) cues change.

(Inherited fromControl)
Click

Occurs when the control is clicked.

(Inherited fromControl)
ClientSizeChanged

Occurs when the value of theClientSize property changes.

(Inherited fromControl)
ContextMenuChanged
Obsolete.

Occurs when the value of theContextMenu property changes.

(Inherited fromControl)
ContextMenuStripChanged

Occurs when the value of theContextMenuStrip property changes.

(Inherited fromControl)
ControlAdded

This event is not relevant to this class.

ControlRemoved

This event is not relevant to this class.

CursorChanged

Occurs when the value of theCursor property changes.

(Inherited fromControl)
DataContextChanged

Occurs when the value of theDataContext property changes.

(Inherited fromControl)
Disposed

Occurs when the component is disposed by a call to theDispose() method.

(Inherited fromComponent)
DockChanged

Occurs when the value of theDock property changes.

(Inherited fromControl)
DoubleClick

Occurs when the control is double-clicked.

(Inherited fromControl)
DpiChangedAfterParent

Occurs when the DPI setting for a control is changed programmatically after the DPI of its parent control or form has changed.

(Inherited fromControl)
DpiChangedBeforeParent

Occurs when the DPI setting for a control is changed programmatically before a DPI change event for its parent control or form has occurred.

(Inherited fromControl)
DragDrop

Occurs when a drag-and-drop operation is completed.

(Inherited fromControl)
DragEnter

Occurs when an object is dragged into the control's bounds.

(Inherited fromControl)
DragLeave

Occurs when an object is dragged out of the control's bounds.

(Inherited fromControl)
DragOver

Occurs when an object is dragged over the control's bounds.

(Inherited fromControl)
EnabledChanged

Occurs when theEnabled property value has changed.

(Inherited fromControl)
Enter

Occurs when the control is entered.

(Inherited fromControl)
FontChanged

Occurs when theFont property value changes.

(Inherited fromControl)
ForeColorChanged

Occurs when theForeColor property value changes.

(Inherited fromControl)
GiveFeedback

Occurs during a drag operation.

(Inherited fromControl)
GotFocus

Occurs when the control receives focus.

(Inherited fromControl)
HandleCreated

Occurs when a handle is created for the control.

(Inherited fromControl)
HandleDestroyed

Occurs when the control's handle is in the process of being destroyed.

(Inherited fromControl)
HelpRequested

Occurs when the user requests help for a control.

(Inherited fromControl)
ImeModeChanged

Occurs when theImeMode property has changed.

(Inherited fromControl)
Invalidated

Occurs when a control's display requires redrawing.

(Inherited fromControl)
KeyDown

Occurs when a key is pressed while the control has focus.

(Inherited fromControl)
KeyPress

Occurs when a character, space, or backspace key is pressed while the control has focus.

(Inherited fromControl)
KeyUp

Occurs when a key is released while the control has focus.

(Inherited fromControl)
Layout

Occurs when a control should reposition its child controls.

(Inherited fromControl)
Leave

Occurs when the input focus leaves the control.

(Inherited fromControl)
LocationChanged

Occurs when theLocation property value has changed.

(Inherited fromControl)
LostFocus

Occurs when the control loses focus.

(Inherited fromControl)
MarginChanged

Occurs when the control's margin changes.

(Inherited fromControl)
MouseCaptureChanged

Occurs when the control loses mouse capture.

(Inherited fromControl)
MouseClick

Occurs when the control is clicked by the mouse.

(Inherited fromControl)
MouseDoubleClick

Occurs when the control is double clicked by the mouse.

(Inherited fromControl)
MouseDown

Occurs when the mouse pointer is over the control and a mouse button is pressed.

(Inherited fromControl)
MouseEnter

Occurs when the mouse pointer enters the control.

(Inherited fromControl)
MouseHover

Occurs when the mouse pointer rests on the control.

(Inherited fromControl)
MouseLeave

Occurs when the mouse pointer leaves the control.

(Inherited fromControl)
MouseMove

Occurs when the mouse pointer is moved over the control.

(Inherited fromControl)
MouseUp

Occurs when the mouse pointer is over the control and a mouse button is released.

(Inherited fromControl)
MouseWheel

Occurs when the mouse wheel moves while the control has focus.

(Inherited fromControl)
Move

Occurs when the control is moved.

(Inherited fromControl)
PaddingChanged

This event is not relevant to this class.

Paint

Occurs when the control is redrawn.

(Inherited fromControl)
ParentChanged

Occurs when theParent property value changes.

(Inherited fromControl)
PreviewKeyDown

Occurs before theKeyDown event when a key is pressed while focus is on this control.

(Inherited fromControl)
QueryAccessibilityHelp

Occurs whenAccessibleObject is providing help to accessibility applications.

(Inherited fromControl)
QueryContinueDrag

Occurs during a drag-and-drop operation and enables the drag source to determine whether the drag-and-drop operation should be canceled.

(Inherited fromControl)
RegionChanged

Occurs when the value of theRegion property changes.

(Inherited fromControl)
Resize

Occurs when the control is resized.

(Inherited fromControl)
RightToLeftChanged

Occurs when theRightToLeft property value changes.

(Inherited fromControl)
Scroll

Occurs when the user or code scrolls through the client area.

(Inherited fromScrollableControl)
SizeChanged

Occurs when theSize property value changes.

(Inherited fromControl)
SplitterMoved

Occurs when the splitter control is moved.

SplitterMoving

Occurs when the splitter control is in the process of moving.

StyleChanged

Occurs when the control style changes.

(Inherited fromControl)
SystemColorsChanged

Occurs when the system colors change.

(Inherited fromControl)
TabIndexChanged

Occurs when theTabIndex property value changes.

(Inherited fromControl)
TabStopChanged

Occurs when theTabStop property value changes.

(Inherited fromControl)
TextChanged

This event is not relevant to this class.

Validated

Occurs when the control is finished validating.

(Inherited fromControl)
Validating

Occurs when the control is validating.

(Inherited fromControl)
VisibleChanged

Occurs when theVisible property value changes.

(Inherited fromControl)

Explicit Interface Implementations

NameDescription
IContainerControl.ActivateControl(Control)

Activates the specified control.

(Inherited fromContainerControl)
IDropTarget.OnDragDrop(DragEventArgs)

Raises theDragDrop event.

(Inherited fromControl)
IDropTarget.OnDragEnter(DragEventArgs)

Raises theDragEnter event.

(Inherited fromControl)
IDropTarget.OnDragLeave(EventArgs)

Raises theDragLeave event.

(Inherited fromControl)
IDropTarget.OnDragOver(DragEventArgs)

Raises theDragOver event.

(Inherited fromControl)

Applies to

See also

Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, seeour contributor guide.

Feedback

Was this page helpful?

YesNoNo

Need help with this topic?

Want to try using Ask Learn to clarify or guide you through this topic?

Suggest a fix?

In this article

Was this page helpful?

YesNo
NoNeed help with this topic?

Want to try using Ask Learn to clarify or guide you through this topic?

Suggest a fix?