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.

適用於

另請參閱