StatusStrip.Dock 속성

정의

부모 컨트롤에 도킹된 StatusStrip 테두리를 가져오거나 설정하고 StatusStrip이 부모와 함께 크기 조정되는 방법을 확인합니다.

public:
 virtual property System::Windows::Forms::DockStyle Dock { System::Windows::Forms::DockStyle get(); void set(System::Windows::Forms::DockStyle value); };
public override System.Windows.Forms.DockStyle Dock { get; set; }
member this.Dock : System.Windows.Forms.DockStyle with get, set
Public Overrides Property Dock As DockStyle

속성 값

DockStyle

DockStyle 값 중 하나입니다. 기본값은 Bottom입니다.

예제

다음 코드 예제에서는 속성을 비롯한 다양한 공통 속성 집합을 Dock 보여 StatusStrip 줍니다.

statusStrip1.Dock = System.Windows.Forms.DockStyle.Top;
statusStrip1.GripStyle = System.Windows.Forms.ToolStripGripStyle.Visible;
statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
toolStripStatusLabel1});
statusStrip1.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.HorizontalStackWithOverflow;
statusStrip1.Location = new System.Drawing.Point(0, 0);
statusStrip1.Name = "statusStrip1";
statusStrip1.ShowItemToolTips = true;
statusStrip1.Size = new System.Drawing.Size(292, 22);
statusStrip1.SizingGrip = false;
statusStrip1.Stretch = false;
statusStrip1.TabIndex = 0;
statusStrip1.Text = "statusStrip1";
statusStrip1.Dock = System.Windows.Forms.DockStyle.Top
statusStrip1.GripStyle = System.Windows.Forms.ToolStripGripStyle.Visible
statusStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {toolStripStatusLabel1})
statusStrip1.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.HorizontalStackWithOverflow
statusStrip1.Location = New System.Drawing.Point(0, 0)
statusStrip1.Name = "statusStrip1"
statusStrip1.ShowItemToolTips = True
statusStrip1.Size = New System.Drawing.Size(292, 22)
statusStrip1.SizingGrip = False
statusStrip1.Stretch = False
statusStrip1.TabIndex = 0
statusStrip1.Text = "statusStrip1"

설명

Dock 속성을 사용하여 부모 컨트롤의 크기가 조정될 때 자동으로 크기가 조정되는 방법을 StatusStrip 정의합니다. 예를 들어 부모 컨트롤의 StatusStrip 왼쪽 가장자리에 맞춰지고 부모 컨트롤의 크기가 조정될 때 크기를 조정하도록 설정하는 Dock Left 설정입니다. 컨트롤은 폼의 Z축(깊이)을 따라 폼에 있는 컨트롤의 시각적 계층화인 Z 순서로 도킹됩니다.

컨트롤은 부모 컨테이너의 한 가장자리에 도킹하거나 모든 가장자리에 도킹하여 부모 컨테이너를 채울 수 있습니다.

적용 대상