語言

TaskDialogButtonCollection.Add(String, Boolean, Boolean) 方法

定義

建立並新增 a TaskDialogButton 到集合中。

public System.Windows.Forms.TaskDialogButton Add(string? text, bool enabled = true, bool allowCloseDialog = true);
override this.Add : string * bool * bool -> System.Windows.Forms.TaskDialogButton
Public Function Add (text As String, Optional enabled As Boolean = true, Optional allowCloseDialog As Boolean = true) As TaskDialogButton

參數

text
String

自訂按鈕的文字。

enabled
Boolean

一個表示按鈕是否能回應使用者互動的數值。

allowCloseDialog
Boolean

一個表示點擊此按鈕時任務對話框是否應該關閉的值。

傳回

被創造 TaskDialogButton的。

例外狀況

此集合目前綁定在任務對話框上。

適用於