Control.ResumeLayout
Control.ResumeLayout
Control.ResumeLayout
Control.ResumeLayout
Method
Definición
Reanuda la lógica de diseño habitual.Resumes the usual layout logic.
Sobrecargas
ResumeLayout() ResumeLayout() ResumeLayout() ResumeLayout() |
Reanuda la lógica de diseño habitual.Resumes usual layout logic. |
ResumeLayout(Boolean) ResumeLayout(Boolean) ResumeLayout(Boolean) ResumeLayout(Boolean) |
Reanuda la lógica de diseño habitual, forzando opcionalmente un diseño inmediato de las solicitudes de diseño pendientes.Resumes usual layout logic, optionally forcing an immediate layout of pending layout requests. |
ResumeLayout() ResumeLayout() ResumeLayout() ResumeLayout()
Reanuda la lógica de diseño habitual.Resumes usual layout logic.
public:
void ResumeLayout();
public void ResumeLayout ();
member this.ResumeLayout : unit -> unit
Public Sub ResumeLayout ()
Ejemplos
El ejemplo de código siguiente agrega dos botones a un formulario.The following code example adds two buttons to a form. Las transacciones de ejemplo la adición de los botones mediante el uso de la SuspendLayout y ResumeLayout métodos.The example transactions the addition of the buttons by using the SuspendLayout and ResumeLayout methods.
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
Comentarios
Una llamada a la ResumeLayout método fuerza un diseño inmediato si hay solicitudes de diseño pendientes.Calling the ResumeLayout method forces an immediate layout if there are any pending layout requests.
El SuspendLayout y ResumeLayout métodos se usan conjuntamente para suprimir varios Layout eventos mientras se ajustan varios atributos del control.The SuspendLayout and ResumeLayout methods are used in tandem to suppress multiple Layout events while you adjust multiple attributes of the control. Por ejemplo, normalmente se llamaría a la SuspendLayout método, a continuación, establezca el Size, Location, Anchor, o Dock propiedades del control y, a continuación, llame el ResumeLayout método para habilitar los cambios surtan efecto.For example, you would typically call the SuspendLayout method, then set the Size, Location, Anchor, or Dock properties of the control, and then call the ResumeLayout method to enable the changes to take effect.
No debe haber ninguna llamada pendiente a SuspendLayout para ResumeLayout llamará correctamente.There must be no pending calls to SuspendLayout for ResumeLayout to be successfully called.
- Consulte también:
ResumeLayout(Boolean) ResumeLayout(Boolean) ResumeLayout(Boolean) ResumeLayout(Boolean)
Reanuda la lógica de diseño habitual, forzando opcionalmente un diseño inmediato de las solicitudes de diseño pendientes.Resumes usual layout logic, optionally forcing an immediate layout of pending layout requests.
public:
void ResumeLayout(bool performLayout);
public void ResumeLayout (bool performLayout);
member this.ResumeLayout : bool -> unit
Public Sub ResumeLayout (performLayout As Boolean)
Parámetros
Es true
para ejecutar solicitudes de diseño pendientes; en caso contrario, es false
.true
to execute pending layout requests; otherwise, false
.
Comentarios
Una llamada a la ResumeLayout método fuerza un diseño inmediato si hay solicitudes de diseño pendientes.Calling the ResumeLayout method forces an immediate layout if there are any pending layout requests. Cuando el performLayout
parámetro se establece en true
, se produce un diseño inmediato si hay solicitudes de diseño pendientes.When the performLayout
parameter is set to true
, an immediate layout occurs if there are any pending layout requests.
El SuspendLayout y ResumeLayout métodos se usan conjuntamente para suprimir varios Layout eventos mientras se ajustan varios atributos del control.The SuspendLayout and ResumeLayout methods are used in tandem to suppress multiple Layout events while you adjust multiple attributes of the control. Por ejemplo, normalmente se llamaría a la SuspendLayout método, a continuación, establezca el Size, Location, Anchor, o Dock propiedades del control y, a continuación, llame el ResumeLayout método para habilitar los cambios surtan efecto.For example, you would typically call the SuspendLayout method, then set the Size, Location, Anchor, or Dock properties of the control, and then call the ResumeLayout method to enable the changes to take effect.
No debe haber ninguna llamada pendiente a SuspendLayout para ResumeLayout llamará correctamente.There must be no pending calls to SuspendLayout for ResumeLayout to be successfully called.
Nota
Al agregar varios controles a un control principal, se recomienda que llame el SuspendLayout método antes de inicializar los controles que se va a agregar.When adding several controls to a parent control, it is recommended that you call the SuspendLayout method before initializing the controls to be added. Después de agregar los controles al control primario, llame a la ResumeLayout método.After adding the controls to the parent control, call the ResumeLayout method. Esto aumentará el rendimiento de aplicaciones con muchos controles.This will increase the performance of applications with many controls.
- Consulte también:
Se aplica a
Comentarios
Nos gustaría conocer su opinión. Elija el tipo que desea proporcionar:
Nuestro sistema de comentarios está basado en los problemas de GitHub. Más información en nuestro blog.
Cargando comentarios...