Control.ResumeLayout 메서드

정의

일반 레이아웃 논리를 다시 시작합니다.

오버로드

ResumeLayout()

일반 레이아웃 논리를 다시 시작합니다.

ResumeLayout(Boolean)

일반 레이아웃 논리를 다시 시작하여 필요에 따라 보류 중인 레이아웃 요청을 강제로 즉시 레이아웃합니다.

ResumeLayout()

일반 레이아웃 논리를 다시 시작합니다.

public:
 void ResumeLayout();
public void ResumeLayout ();
member this.ResumeLayout : unit -> unit
Public Sub ResumeLayout ()

예제

다음 코드 예제에서는 폼에 두 개의 단추를 추가합니다. 이 예제에서는 및 ResumeLayout 메서드를 사용하여 단추 추가를 SuspendLayout 트랜잭션합니다.

private:
   void AddButtons()
   {
      // Suspend the form layout and add two buttons.
      this->SuspendLayout();
      Button^ buttonOK = gcnew Button;
      buttonOK->Location = Point(10,10);
      buttonOK->Size = System::Drawing::Size( 75, 25 );
      buttonOK->Text = "OK";
      Button^ buttonCancel = gcnew Button;
      buttonCancel->Location = Point(90,10);
      buttonCancel->Size = System::Drawing::Size( 75, 25 );
      buttonCancel->Text = "Cancel";
      array<Control^>^temp5 = {buttonOK,buttonCancel};
      this->Controls->AddRange( temp5 );
      this->ResumeLayout();
   }
private void AddButtons()
{
   // Suspend the form layout and add two buttons.
   this.SuspendLayout();
   Button buttonOK = new Button();
   buttonOK.Location = new Point(10, 10);
   buttonOK.Size = new Size(75, 25);
   buttonOK.Text = "OK";

   Button buttonCancel = new Button();
   buttonCancel.Location = new Point(90, 10);
   buttonCancel.Size = new Size(75, 25);
   buttonCancel.Text = "Cancel";
      
   this.Controls.AddRange(new Control[]{buttonOK, buttonCancel});
   this.ResumeLayout();
}
Private Sub AddButtons()
   ' Suspend the form layout and add two buttons.
   Me.SuspendLayout()
   Dim buttonOK As New Button()
   buttonOK.Location = New Point(10, 10)
   buttonOK.Size = New Size(75, 25)
   buttonOK.Text = "OK"
   
   Dim buttonCancel As New Button()
   buttonCancel.Location = New Point(90, 10)
   buttonCancel.Size = New Size(75, 25)
   buttonCancel.Text = "Cancel"
   
   Me.Controls.AddRange(New Control() {buttonOK, buttonCancel})
   Me.ResumeLayout()
End Sub

설명

ResumeLayout 보류 중인 레이아웃 요청이 있는 경우 메서드를 호출하면 즉시 레이아웃이 강제로 적용됩니다.

SuspendLayoutResumeLayout 메서드는 컨트롤의 여러 특성을 조정하는 동안 여러 Layout 이벤트를 표시하지 않는 데 함께 사용됩니다. 예를 들어 일반적으로 메서드를 SuspendLayout 호출한 다음, 컨트롤의 , Location, Anchor또는 Dock 속성을 설정한 Size다음 메서드를 ResumeLayout 호출하여 변경 내용을 적용할 수 있도록 합니다.

가 성공적으로 호출되려면 에 대한 ResumeLayout 보류 중인 호출 SuspendLayout 이 없어야 합니다.

추가 정보

적용 대상

ResumeLayout(Boolean)

일반 레이아웃 논리를 다시 시작하여 필요에 따라 보류 중인 레이아웃 요청을 강제로 즉시 레이아웃합니다.

public:
 void ResumeLayout(bool performLayout);
public void ResumeLayout (bool performLayout);
member this.ResumeLayout : bool -> unit
Public Sub ResumeLayout (performLayout As Boolean)

매개 변수

performLayout
Boolean

보류 중인 레이아웃 요청을 실행하려면 true이고, 그렇지 않으면 false입니다.

설명

ResumeLayout 보류 중인 레이아웃 요청이 있는 경우 메서드를 호출하면 즉시 레이아웃이 강제로 적용됩니다. 매개 변수를 performLayouttrue설정하면 보류 중인 레이아웃 요청이 있는 경우 즉시 레이아웃이 발생합니다.

SuspendLayoutResumeLayout 메서드는 컨트롤의 여러 특성을 조정하는 동안 여러 Layout 이벤트를 표시하지 않는 데 함께 사용됩니다. 예를 들어 일반적으로 메서드를 SuspendLayout 호출한 다음, 컨트롤의 , Location, Anchor또는 Dock 속성을 설정한 Size다음 메서드를 ResumeLayout 호출하여 변경 내용을 적용할 수 있도록 합니다.

가 성공적으로 호출되려면 에 대한 ResumeLayout 보류 중인 호출 SuspendLayout 이 없어야 합니다.

참고

부모 컨트롤에 여러 컨트롤을 추가할 때 추가할 컨트롤을 초기화하기 전에 메서드를 호출 SuspendLayout 하는 것이 좋습니다. 부모 컨트롤에 컨트롤을 추가한 후 메서드를 호출합니다 ResumeLayout . 이렇게 하면 많은 컨트롤을 사용 하 여 애플리케이션의 성능을 늘어납니다.

추가 정보

적용 대상