SplitContainer.Panel1 SplitContainer.Panel1 SplitContainer.Panel1 SplitContainer.Panel1 Property

定義

根據 SplitContainer 取得 Orientation 的左方或上方面板。Gets the left or top panel of the SplitContainer, depending on Orientation.

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

屬性值

如果 OrientationVertical,則為 SplitContainer 的左方面板。If Orientation is Vertical, the left panel of the SplitContainer. 如果 OrientationHorizontal,則為 SplitContainer 的上方面板。If Orientation is Horizontal, the top panel of the SplitContainer.

備註

使用屬性,即可設定垂直SplitContainer或水準SplitContainer上方面板的左面板。 Panel1Use the Panel1 property to configure the left panel of a vertical SplitContainer or the top panel of a horizontal SplitContainer. 例如,您可以藉由變更Panel1MinSize屬性的值來指定面板的最小大小, FixedPanel將屬性設定為,如此Panel1一來,當調整容器大小時,面板會保持相同的大小,或者您可以取得或設定面板的BackgroundImageBackgroundImageLayout屬性。For example, you can specify the minimum size of the panel by changing the value of the Panel1MinSize property, set the FixedPanel property to Panel1 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.

您無法Panel1 SplitContainer從移除。You cannot remove Panel1 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.

如果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.

適用於

另請參閱