Alternative MsgBox
(Tested in MacOS and Windows 10 - Xojo 2018r2)
This MsgBox gives the same functionality as MsgBox in Xojo plus some extras.
Syntax:
alt_MsgBox <message>
result = alt_MsgBox (<message>, [buttons], [title])
The buttons parameter is the same as MsgBox.
(See Page Not Found — Xojo documentation)
?Extra functionality:
Set color of title text and/or title bar
Set color of backgound and/or message text
alt_MsgBox_colorTitleBar - Set text color of title bar
alt_MsgBox_colorTitleText Set color of title text
alt_MsgBox_colorBackground - Set background color of message area
alt_MsgBox_colorMessageText - Set color of message text
Usage:
alt_MsgBox_colorTitleBar =
alt_MsgBox_colorTitleText =
Example:
alt_MsgBox_colorTitleBar = &CEE000000
alt_MsgBox_colorTitleText = &C0000EE00
intReturn = alt_MsgBox(strMsg, 16, "Title of the new alt_MsgBox")
When alt_MsgBox is closed, the colors of the TitleBar, TitleText, colorBackground and colorMessageText are
reset to default (&c000000FF)
Since the color is reset when closing alt_MsgBox, adjust the color(s) in the Xojo IDE for your own standard coloring.
Position alt_MsgBox
alt_MsgBox_Top - Top position of alt_MsgBox in relation to the available top position of the main screen
alt_MsgBox_Left - Left position of alt_MsgBox in relation to the available left position of the main screen
Usage:
alt_MsgBox_Top =
alt_MsgBox_Left =
Example:
alt_MsgBox_colorTitleBar = &CEE000000
alt_MsgBox_colorTitleText = &C0000EE00
intReturn = alt_MsgBox(strMsg, 16, "Title of the new alt_MsgBox")
When alt_MsgBox is closed, the top and left positions of the window are reset to default (-1)
Mac



Windows



Project
alt_MsgBox.zip
(Contains all the pictures used in project. You have add them again after opening the project for the first time)
When moving alt_MsgBox (folder MessageBox) to your own project, recreating of the Imagesets is required.
See <https://xojo.com/issue/53160>