How can I customise a message box

I want to give the user a choice of two options, or to cancel the operation. I can use a YES/NO/CANCEL message box for this, but it’s not possible to change the text on the buttons. I don’t want to have to put text like 'For Option 1 click “Yes”, for Option 2 click “No” ’ at the top as there’s no asymmetry between the options.

I’ve found a way to simulate this operation using a dialog (and will post it if anyone’s interested), but would like to know if there’s a way of changing the text and using the Msgbox function.

Hello,

@librebel has provided a routine which already accomplishes what you are looking for - How to change color or font for some part of the text in the msgbox?

Sample using routine & changing button text to ‘Hello’ from ‘OK’:

image description

EDIT 2018-03-20:

Hopefully this will be clearer as a sample:

image description

Be sure to upvote the answer while you are there.

I’m afraid that @librebel’s code changes the attributes of the text part of the message box, but not the text within the buttons. It’s the “OK”, “Yes”, No" part that I want to change. Sorry for not being clearer.

@ptoye It was clear and understood. However you must have your eyes closed when looking at my answer. The actual text “My name is John Roberts” is NOT what was pointed to in the line proceeding the image. The text on the button itself was changed from “OK” to “Hello” as can be seen in the image - exactly what you were looking for. How to do it is in the comments for the parameters at the beginning the code. It does a great deal more than changing attributes of text.

hello @ptoye, the twelfth argument passed to the Messagebox() function can be an Array of Strings containing your custom Button Labels.
E.g.:

MessageBox( "Hello", 3, "Title", 4, , 170, 50, , , , RGB(154,216,95), Array( "🆗id🆗i", "⛔ Nyet","␛ Canceli" ), , 1.9 )

Hello,

@librebel has provided a routine which already accomplishes what you are looking for - How to change color or font for some part of the text in the msgbox?

Sample using routine & changing button text to ‘Hello’ from ‘OK’:

image description

EDIT 2018-03-20:

Hopefully this will be clearer as a sample:

image description

Be sure to upvote the answer while you are there.