ToolStrip.LayoutCompleted 事件

定義

發生於 ToolStrip 的配置完成時。

public:
 event EventHandler ^ LayoutCompleted;
public event EventHandler LayoutCompleted;
public event EventHandler? LayoutCompleted;
member this.LayoutCompleted : EventHandler 
Public Custom Event LayoutCompleted As EventHandler 

事件類型

範例

下列程式碼範例示範如何使用這個成員。 在此範例中,事件處理常式會報告事件的發生次數 LayoutCompleted 。 此報告可協助您瞭解事件發生的時間,並可協助您進行偵錯。 若要報告多個事件或經常發生的事件,請考慮將 取代 MessageBox.ShowConsole.WriteLine 或將訊息附加至多行 TextBox

若要執行範例程式碼,請將它貼入包含名為 ToolStrip1 之類型 ToolStrip 實例的專案。 然後,確定事件處理常式與 事件相關聯 LayoutCompleted

private void ToolStrip1_LayoutCompleted(Object sender, EventArgs e) {

   MessageBox.Show("You are in the ToolStrip.LayoutCompleted event.");
}
Private Sub ToolStrip1_LayoutCompleted(sender as Object, e as EventArgs) _ 
     Handles ToolStrip1.LayoutCompleted

   MessageBox.Show("You are in the ToolStrip.LayoutCompleted event.")

End Sub

備註

當專案不符合 時 ToolStrip ,會自動顯示溢位按鈕。 屬性 Overflow 設定會決定專案是否一律會視需要出現在溢位區域中,或永遠不出現在溢位區域中。

Placement檢查 事件中的 LayoutCompleted 屬性,以判斷專案是否放在主要 ToolStrip 、溢位 ToolStrip ,或目前未顯示。 未顯示專案的典型原因是專案不符合 main ToolStrip ,且其 Overflow 屬性設定為 Never

如需處理事件的詳細資訊,請參閱 處理和引發事件

適用於