Command: MsgButtonTextSet
- Updated2024-09-12
- 3 minute(s) read
Command: MsgButtonTextSet
Command: MsgButtonTextSet
Changes the button labels in the next message box.
Input Parameters
[MsgButtonText1] |
Specifies the label text for the first button in a message box. By default the MsgButtonType parameter of the subsequent command MsgBoxDisp specifies the button labels. |
[MsgButtonText2] |
Specifies the label text for the second button in a message box. By default the MsgButtonType parameter of the subsequent command MsgBoxDisp specifies the button labels. |
[MsgButtonText3] |
Specifies the label text for the third button in a message box. By default the MsgButtonType parameter of the subsequent command MsgBoxDisp specifies the button labels. |
| Note Use the MsgButtonTextSet command before the MsgBoxDisp command that displays the message, because DIAdem deletes the set values and then displays messages with the default settings. |
Example
In the following example, DIAdem opens a message box with three buttons. Use the MsgBoxSetPos command to set the message box in the upper left corner. Use the MsgButtonTextSet command to replace the default text with your own text. In the MsgState variable, DIAdem saves the button you clicked to close the message box. DIAdem displays a different type of dialog box depending on which button you click. At the end of the example, a non-modal message remains open for 10 more seconds. The script has been executed at this point.
| VBScript | Python |
Call MsgBoxSetPos(10, 10, 30, 20) Call MsgButtonTextSet("Step&1", "Step&2", "Step&3") Call MsgBoxDisp("Select next step","MB_YESNOCANCEL") Select Case MsgState Case "IDYes" Call MsgBoxDisp("Step 1", "MB_OK", "MsgTypeNote",, 5) Case "IDNo" Call MsgBoxDisp("Step 2", "MB_OK", "MsgTypeInformation",, 5) Case "IDCancel" Call MsgBoxDisp("Step 3", "MB_OK", "MsgTypeWarning",, 5) End Select MsgNotModal = TRUE Call MsgBoxDisp("Example completed", "MB_NOBUTTON", "MsgTypeNote",, 10,MsgNotModal)
Related Topics
Command: AutoLoopInit | Command: LoopDeInit | Command: LoopInc | Command: LoopInit | Command: MsgBoxCancel | Command: MsgBoxDisp | Command: MsgBoxSetPos | Command: MsgBoxStateResetAll | Command: MsgLineDisp | Command: ProcessMessages | Variable: MsgButtonType | Variable: MsgNotModal | Variable: MsgState | Variable: MsgStdButton | Variable: MsgText | Variable: MsgTimeOut | Variable: MsgType

