MessageDialog.Icon

From Xojo Documentation

Property (As Integer )
aMessageDialog.Icon = newIntegerValue
or
IntegerValue = aMessageDialog.Icon

Supported for all project types and targets.

Number indicating the type of icon to be displayed in the dialog box.

Notes

These icons are supplied by the host operating system. You can use the following class constants to specify the icon:

Value Description
-1 GraphicNone
0 GraphicNote (The application icon on macOS)
1 GraphicCaution triangle (On macOS, the application icon superimposed on the caution triangle)
2 GraphicStop (On macOS, the application icon)
3 GraphicQuestion icon (On macOS, it is the same as 0)


If the value of Icon is out of range, an OutOfBoundsException occurs.

You can set the text of the message, the subordinate explanation, the type of icon shown in the dialog (no icon, Note, Warning, Stop, or Question), and the title. Not all of the icons are presented in macOS. The following table shows how the icons appear on each platform and value of the Icon property.

Platform Value of the Icon Property
0 (Note) 1 (Caution) 2 (Stop) 3 (Question)
Windows Windows Note Icon.jpg Windows Caution Icon.jpg Windows Stop Icon.jpg Windows Question Icon.jpg
macOS OSX Note Icon.jpg OSX Caution Icon.jpg OSX Stop Icon.jpg OSX Question Icon.jpg
Linux Linux Note Icon.jpg Linux Caution Icon.jpg Linux Stop Icon.jpg Linux Question Icon.jpg