SplitContainer.Panel2 SplitContainer.Panel2 SplitContainer.Panel2 SplitContainer.Panel2 Property

定义

获取 SplitContainer 的右侧面板或下部面板(根据 Orientation 而定)。Gets the right or bottom panel of the SplitContainer, depending on Orientation.

public:
 property System::Windows::Forms::SplitterPanel ^ Panel2 { System::Windows::Forms::SplitterPanel ^ get(); };
public System.Windows.Forms.SplitterPanel Panel2 { get; }
member this.Panel2 : System.Windows.Forms.SplitterPanel
Public ReadOnly Property Panel2 As SplitterPanel

属性值

如果 OrientationVertical,则获取 SplitContainer 的右侧面板。If Orientation is Vertical, the right panel of the SplitContainer. 如果 OrientationHorizontal,则获取 SplitContainer 的下部面板。If Orientation is Horizontal, the bottom panel of the SplitContainer.

注解

使用属性可配置水平的右面板SplitContainer或水平SplitContainer的底部面板。 Panel2Use the Panel2 property to configure the right panel of a vertical SplitContainer or the bottom panel of a horizontal SplitContainer. 例如,你可以通过更改Panel2MinSize属性的值来指定面板的最小大小, FixedPanel将属性设置为Panel2 ,以便在调整容器大小时面板保持相同大小,或者可以获取或设置面板的BackgroundImageBackgroundImageLayout属性。For example, you can specify the minimum size of the panel by changing the value of the Panel2MinSize property, set the FixedPanel property to Panel2 so that the panel remains the same size when the container is resized, or you can get or set the panel's BackgroundImage and BackgroundImageLayout properties.

Panel2 无法SplitContainer从中移除。You cannot remove Panel2 from the SplitContainer.

备注

如果Panel1Panel2不包含可接收焦点的控件,则焦点会在被单击时保持在拆分器上。If Panel1 or Panel2 contains no control that can receive the focus, the focus remains on the splitter when it is clicked. 若要将焦点更改Panel1Panel2Panel2 ,请TabIndex将的Panel1属性设置为 0 TabIndex ,将的属性设置为1。To change the focus to Panel1 or Panel2, set the TabIndex property of Panel2 to 0 and the TabIndex property of Panel1 to 1.

适用于

另请参阅