DockStyle 열거형

정의

컨트롤이 도킹되는 위치와 방법을 지정합니다.

public enum class DockStyle
public enum DockStyle
type DockStyle = 
Public Enum DockStyle
상속
DockStyle

필드

Bottom 2

컨트롤의 아래쪽 가장자리가 포함된 컨트롤의 아래쪽에 도킹됩니다.

Fill 5

컨트롤의 모든 가장자리가 포함 컨트롤의 모든 가장자리에 도킹되고 가장자리의 크기는 알맞게 조정됩니다.

Left 3

컨트롤의 왼쪽 가장자리가 포함된 컨트롤의 왼쪽 가장자리에 도킹됩니다.

None 0

컨트롤이 도킹되지 않습니다.

Right 4

컨트롤의 오른쪽 가장자리가 포함된 컨트롤의 오른쪽 가장자리에 도킹됩니다.

Top 1

컨트롤의 위쪽 가장자리가 포함된 컨트롤의 위쪽에 도킹됩니다.

예제

다음 예제에서는 GroupBox 해당 공용 속성 중 일부를 설정 합니다. 이 예에서는 만듭니다는 TextBox 설정 및 해당 Location 그룹 상자 내에서. 그런 다음 설정의 Text 그룹 상자 및 폼의 위쪽에 도킹 된 그룹 상자는 속성입니다. 마지막으로, 그룹 상자를 설정 하 여 비활성화 된 Enabled 속성을 false, 사용 하지 않도록 설정할 그룹 상자 내에 포함 된 모든 컨트롤에 이르게 합니다.

   // Add a GroupBox to a form and set some of its common properties.
private:
   void AddMyGroupBox()
   {
      // Create a GroupBox and add a TextBox to it.
      GroupBox^ groupBox1 = gcnew GroupBox;
      TextBox^ textBox1 = gcnew TextBox;
      textBox1->Location = Point(15,15);
      groupBox1->Controls->Add( textBox1 );

      // Set the Text and Dock properties of the GroupBox.
      groupBox1->Text = "MyGroupBox";
      groupBox1->Dock = DockStyle::Top;

      // Disable the GroupBox (which disables all its child controls)
      groupBox1->Enabled = false;

      // Add the Groupbox to the form.
      this->Controls->Add( groupBox1 );
   }
// Add a GroupBox to a form and set some of its common properties.
private void AddMyGroupBox()
{
   // Create a GroupBox and add a TextBox to it.
   GroupBox groupBox1 = new GroupBox();
   TextBox textBox1 = new TextBox();
   textBox1.Location = new Point(15, 15);
   groupBox1.Controls.Add(textBox1);

   // Set the Text and Dock properties of the GroupBox.
   groupBox1.Text = "MyGroupBox";
   groupBox1.Dock = DockStyle.Top;

   // Disable the GroupBox (which disables all its child controls)
   groupBox1.Enabled = false;

   // Add the Groupbox to the form.
   this.Controls.Add(groupBox1);
}
' Add a GroupBox to a form and set some of its common properties.
Private Sub AddMyGroupBox()
   ' Create a GroupBox and add a TextBox to it.
   Dim groupBox1 As New GroupBox()
   Dim textBox1 As New TextBox()
   textBox1.Location = New Point(15, 15)
   groupBox1.Controls.Add(textBox1)
   
   ' Set the Text and Dock properties of the GroupBox.
   groupBox1.Text = "MyGroupBox"
   groupBox1.Dock = DockStyle.Top
   
   ' Disable the GroupBox (which disables all its child controls)
   groupBox1.Enabled = False
   
   ' Add the Groupbox to the form.
   Me.Controls.Add(groupBox1)
End Sub

설명

컨트롤이 해당 컨테이너의 가장자리에 도킹 되, 하는 경우 항상 놓을 플러시 해당 가장자리에 대해 컨테이너 크기를 조정할 때. 컨트롤의 z-순서에 따라 나란히 표시 하는 하나 이상의 컨트롤을 가장자리에 도킹 됩니다을 하는 경우 컨트롤을 z-순서에서 더 높은 컨테이너의 가장자리 멀어지는 방향으로 배치 됩니다.

왼쪽, 오른쪽, 위쪽 또는 아래쪽을 선택 하면 포함 된 컨트롤의 해당 가장자리의 크기를 지정 및 반대 되는 컨트롤의 가장자리 크기가 조정 됩니다. 채우기가 선택 하는 경우 컨트롤의 네 면 모두 포함 된 컨트롤의 가장자리에 맞게 크기가 조정 됩니다.

적용 대상

추가 정보