ScrollableControl.DockPaddingEdges.Bottom ScrollableControl.DockPaddingEdges.Bottom ScrollableControl.DockPaddingEdges.Bottom ScrollableControl.DockPaddingEdges.Bottom Property

정의

도킹된 컨트롤의 아래쪽 가장자리에 대해 안쪽 여백 너비를 가져오거나 설정합니다.Gets or sets the padding width for the bottom edge of a docked control.

public:
 property int Bottom { int get(); void set(int value); };
public int Bottom { get; set; }
member this.Bottom : int with get, set
Public Property Bottom As Integer

속성 값

안쪽 여백 너비(픽셀)입니다.The padding width, in pixels.

예제

다음 코드 예제에서는 파생된 클래스인 Panel합니다.The following code example uses the derived class, Panel. 예제에서는 단추 패널 컨트롤에 도킹 하 고 순환는 ScrollableControl.DockPaddingEdges 속성을 각각 단추 클릭에 개별적으로 설정 합니다.The example docks a button in a panel control and cycles through the ScrollableControl.DockPaddingEdges properties, setting each individually on the click of the button. 이 코드를 실행 하려면를 Panel 컨트롤 및 Button 양식 및 클래스 수준 멤버 변수에에서 인스턴스화된 myCounter 32 비트 부호 있는 정수로 선언 합니다.This code requires that a Panel control and a Button have been instantiated on a form, and a class-level member variable named myCounter has been declared as a 32-bit signed integer. 이 코드에서 호출 해야 합니다 Click 단추의 이벤트입니다.This code should be called on the Click event of the button.

void SetDockPadding()
{
   // Dock the button in the panel.
   button1->Dock = System::Windows::Forms::DockStyle::Fill;

   // Reset the counter if it is greater than 5.
   if ( myCounter > 5 )
   {
      myCounter = 0;
   }


   /* Set the appropriate DockPadding and display
          which one was set on the button face. */
   switch ( myCounter )
   {
      case 0:
         panel1->DockPadding->All = 0;
         button1->Text = "Start";
         break;

      case 1:
         panel1->DockPadding->Top = 10;
         button1->Text = "Top";
         break;

      case 2:
         panel1->DockPadding->Bottom = 10;
         button1->Text = "Bottom";
         break;

      case 3:
         panel1->DockPadding->Left = 10;
         button1->Text = "Left";
         break;

      case 4:
         panel1->DockPadding->Right = 10;
         button1->Text = "Right";
         break;

      case 5:
         panel1->DockPadding->All = 20;
         button1->Text = "All";
         break;
   }
   myCounter++;
}

private void SetDockPadding()
 {
    // Dock the button in the panel.
    button1.Dock = System.Windows.Forms.DockStyle.Fill;
    
    // Reset the counter if it is greater than 5.
    if (myCounter > 5)
    {
       myCounter = 0;
    }
 
    /* Set the appropriate DockPadding and display
       which one was set on the button face. */
    switch (myCounter)
    {
       case 0:
          panel1.DockPadding.All = 0;
          button1.Text = "Start";
          break;
       case 1:
          panel1.DockPadding.Top = 10;
          button1.Text = "Top";
          break;
       case 2:
          panel1.DockPadding.Bottom = 10;
          button1.Text = "Bottom";
          break;
       case 3:
          panel1.DockPadding.Left = 10;
          button1.Text = "Left";
          break;
       case 4:
          panel1.DockPadding.Right = 10;
          button1.Text = "Right";
          break;
       case 5:
          panel1.DockPadding.All = 20;
          button1.Text = "All";
          break;
    }
    
    // Increment the counter.
    myCounter += 1;
 }
 
Private Sub SetDockPadding()
    ' Dock the button in the panel.
    button1.Dock = System.Windows.Forms.DockStyle.Fill
    
    ' Reset the counter if it is greater than 5.
    If myCounter > 5 Then
        myCounter = 0
    End If
    
    ' Set the appropriate DockPadding and display
    ' which one was set on the button face. 
    Select Case myCounter
        Case 0
            panel1.DockPadding.All = 0
            button1.Text = "Start"
        Case 1
            panel1.DockPadding.Top = 10
            button1.Text = "Top"
        Case 2
            panel1.DockPadding.Bottom = 10
            button1.Text = "Bottom"
        Case 3
            panel1.DockPadding.Left = 10
            button1.Text = "Left"
        Case 4
            panel1.DockPadding.Right = 10
            button1.Text = "Right"
        Case 5
            panel1.DockPadding.All = 20
            button1.Text = "All"
    End Select
    
    ' Increment the counter.
    myCounter += 1
End Sub

설명

이 속성에 할당 된 안쪽 여백 너비를 도킹된 된 컨트롤의 아래쪽 가장자리에만 적용 됩니다.The padding width assigned to this property is applied only to the bottom edge of the docked control.

적용 대상

추가 정보