Skip to main content

Dialoge

Normaler Textdialog

Var d As New MessageDialog                  // declare the MessageDialog object
Var b As MessageDialogButton                // for handling the result
d.IconType = MessageDialog.IconTypes.Caution       // display warning icon
d.ActionButton.Caption = "Save"
d.CancelButton.Visible = True               // show the Cancel button
d.AlternateActionButton.Visible = True      // show the "Don't Save" button
d.AlternateActionButton.Caption = "Don't Save"
d.Message = "Do you want to save changes to this document before closing?"
d.Explanation = "If you don't save, your changes will be lost. "

b = d.ShowModal                             // display the dialog
Select Case b                               // determine which button was pressed.
Case d.ActionButton
  // user pressed Save
Case d.AlternateActionButton
  // user pressed Don't Save
Case d.CancelButton
  // user pressed Cancel
End Select

 

 

https://docs.xojo.com/MessageDialog