Condividi tramite


Control.Bottom Proprietà

Definizione

Ottiene la distanza in pixel tra il bordo inferiore del controllo e il bordo superiore dell'area client del contenitore.

public:
 property int Bottom { int get(); };
[System.ComponentModel.Browsable(false)]
public int Bottom { get; }
[<System.ComponentModel.Browsable(false)>]
member this.Bottom : int
Public ReadOnly Property Bottom As Integer

Valore della proprietà

Oggetto Int32 che rappresenta la distanza in pixel tra il bordo inferiore del controllo e il bordo superiore dell'area client del contenitore.

Attributi

Esempio

Nell'esempio di codice seguente viene usata la Bottom proprietà per definire il limite inferiore di un TextBox controllo rispetto all'area client del contenitore.

   // This example demonstrates how to use the KeyUp event with the Help class to display
   // pop-up style help to the user of the application. When the user presses F1, the Help
   // class displays a pop-up window, similar to a ToolTip, near the control. This example assumes
   // that a TextBox control, named textBox1, has been added to the form and its KeyUp
   // event has been connected to this event handler method.
private:
   void textBox1_KeyUp( Object^ /*sender*/, System::Windows::Forms::KeyEventArgs^ e )
   {
      
      // Determine whether the key entered is the F1 key. Display help if it is.
      if ( e->KeyCode == Keys::F1 )
      {
         
         // Display a pop-up help topic to assist the user.
         Help::ShowPopup( textBox1, "Enter your first name", Point(textBox1->Right,this->textBox1->Bottom) );
      }
   }
// This example demonstrates how to use the KeyUp event with the Help class to display
// pop-up style help to the user of the application. When the user presses F1, the Help
// class displays a pop-up window, similar to a ToolTip, near the control. This example assumes
// that a TextBox control, named textBox1, has been added to the form and its KeyUp
// event has been contected to this event handler method.
private void textBox1_KeyUp(object sender, System.Windows.Forms.KeyEventArgs e)
{
    // Determine whether the key entered is the F1 key. Display help if it is.
    if(e.KeyCode == Keys.F1)
    {
        // Display a pop-up help topic to assist the user.
        Help.ShowPopup(textBox1, "Enter your first name", new Point(textBox1.Right, this.textBox1.Bottom));
    }
}
' This example demonstrates how to use the KeyUp event with the Help class to display
' pop-up style help to the user of the application. When the user presses F1, the Help
' class displays a pop-up window, similar to a ToolTip, near the control. This example assumes
' that a TextBox control, named textBox1, has been added to the form and its KeyUp
' event has been contected to this event handler method.
Private Sub textBox1_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles textBox1.KeyUp
    ' Determine whether the key entered is the F1 key. Display help if it is.
    If e.KeyCode = Keys.F1 Then
        ' Display a pop-up help topic to assist the user.
        Help.ShowPopup(textBox1, "Enter your first name", New Point(textBox1.Right, Me.textBox1.Bottom))
    End If
End Sub

Commenti

Il valore di questa proprietà è uguale alla somma del valore della proprietà e al valore della TopHeight proprietà.

La Bottom proprietà è una proprietà di sola lettura. È possibile modificare questo valore della proprietà modificando il valore delle Top proprietà o Height o chiamando i SetBoundsmetodi , SetBoundsCore, UpdateBoundso SetClientSizeCore .

Si applica a

Vedi anche