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

定义

获取的左端或顶端面板SplitContainer,具体取决于OrientationGets 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,左的面板中的SplitContainerIf Orientation is Vertical, the left panel of the SplitContainer. 如果OrientationHorizontal的顶部面板SplitContainerIf Orientation is Horizontal, the top panel of the SplitContainer.

注解

使用Panel1属性可以配置左的面板中的垂直SplitContainer或水平的顶部面板SplitContainerUse 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.

不能删除Panel1SplitContainerYou 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. 若要将焦点更改Panel1Panel2,将TabIndex属性Panel2为 0 并TabIndex属性Panel1为 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. 若要将焦点更改Panel1Panel2,将TabIndex属性Panel2为 0 并TabIndex属性Panel1为 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.

适用于

另请参阅