ExceptionMessageBox.SetButtonText Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Sets the text for custom text buttons.
Overloads
SetButtonText(String) |
Sets the text for the custom text button when only one button is displayed in the exception message box. |
SetButtonText(String, String) |
Sets the text for the custom text buttons when only two buttons are displayed in the exception message box. |
SetButtonText(String, String, String) |
Sets the text for the custom text buttons when only three buttons are displayed in the exception message box. |
SetButtonText(String, String, String, String) |
Sets the text for the custom text buttons when only four buttons are displayed in the exception message box. |
SetButtonText(String, String, String, String, String) |
Sets the text for the custom text buttons when only five buttons are displayed in the exception message box. |
Remarks
Custom text buttons are used when Buttons is set to Custom.
The number of button text strings provided determines the number of custom text buttons displayed. The buttons are displayed in the order in which the strings are specified.
After the message box has been dismissed, use CustomDialogResult to determine which button was clicked.
SetButtonText(String)
Sets the text for the custom text button when only one button is displayed in the exception message box.
public:
void SetButtonText(System::String ^ button1Text);
public void SetButtonText (string button1Text);
member this.SetButtonText : string -> unit
Public Sub SetButtonText (button1Text As String)
Parameters
- button1Text
- String
Text for the first custom button.
Applies to
SetButtonText(String, String)
Sets the text for the custom text buttons when only two buttons are displayed in the exception message box.
public:
void SetButtonText(System::String ^ button1Text, System::String ^ button2Text);
public void SetButtonText (string button1Text, string button2Text);
member this.SetButtonText : string * string -> unit
Public Sub SetButtonText (button1Text As String, button2Text As String)
Parameters
- button1Text
- String
Text for the first custom button.
- button2Text
- String
Text for the second custom button.
Applies to
SetButtonText(String, String, String)
Sets the text for the custom text buttons when only three buttons are displayed in the exception message box.
public:
void SetButtonText(System::String ^ button1Text, System::String ^ button2Text, System::String ^ button3Text);
public void SetButtonText (string button1Text, string button2Text, string button3Text);
member this.SetButtonText : string * string * string -> unit
Public Sub SetButtonText (button1Text As String, button2Text As String, button3Text As String)
Parameters
- button1Text
- String
Text for the first custom button.
- button2Text
- String
Text for the second custom button.
- button3Text
- String
Text for the third custom button.
Applies to
SetButtonText(String, String, String, String)
Sets the text for the custom text buttons when only four buttons are displayed in the exception message box.
public:
void SetButtonText(System::String ^ button1Text, System::String ^ button2Text, System::String ^ button3Text, System::String ^ button4Text);
public void SetButtonText (string button1Text, string button2Text, string button3Text, string button4Text);
member this.SetButtonText : string * string * string * string -> unit
Public Sub SetButtonText (button1Text As String, button2Text As String, button3Text As String, button4Text As String)
Parameters
- button1Text
- String
Text for the first custom button.
- button2Text
- String
Text for the second custom button.
- button3Text
- String
Text for the third custom button.
- button4Text
- String
Text for the fourth custom button.
Applies to
SetButtonText(String, String, String, String, String)
Sets the text for the custom text buttons when only five buttons are displayed in the exception message box.
public:
void SetButtonText(System::String ^ button1Text, System::String ^ button2Text, System::String ^ button3Text, System::String ^ button4Text, System::String ^ button5Text);
public void SetButtonText (string button1Text, string button2Text, string button3Text, string button4Text, string button5Text);
member this.SetButtonText : string * string * string * string * string -> unit
Public Sub SetButtonText (button1Text As String, button2Text As String, button3Text As String, button4Text As String, button5Text As String)
Parameters
- button1Text
- String
Text for the first custom button.
- button2Text
- String
Text for the second custom button.
- button3Text
- String
Text for the third custom button.
- button4Text
- String
Text for the fourth custom button.
- button5Text
- String
Text for the fifth custom button.