I am trying to rename buttons on a msgbox command and cannot get it to populate.
def msg(165)="&Summary,&Detail,&Cancel"
msgbox "Test","Test","?,YESNOCANCEL",x$
Still shows Yes No and Cancel as the button options
msgbox "Test","Test","?,BTN1=Summary, BTN2=Detail, BTN3=Cancel,3",x$
Shows just an OK option.
Wondering if this option is available.
Yes, it is. I use it as needed.
Try taking the spaces out from between your options in your second example.
Also, if you want hotkeys, precede the hotkey character in the option with an ampersand.
I found the issue. I had to turn on 'MX'
set_param 'MX'
def msg(156)="&Summary,&Detail,&Cancel"
msgbox "Test","Test","?,YESNOCANCEL",xx$
def msg(156)="&Yes,&No,&Cancel"
set_param 'MX'=0
That did the trick.
Thank you James
You should not need to change the default message text. I tried the following on PxPlus V19 and it worked just fine:
->?prm('mx') ! Confirm MX is not set
0
->msgbox "hello","world","?,Btn1=Help,Btn2=Me,Btn3=Please,3",x$
->?x$
BTN2
What version PxPlus are you using?
The problem are the spaces in the MSGBOX, Remove them and it will work.
msgbox "Test","Test","?,BTN1=Summary, BTN2=Detail, BTN3=Cancel,3",x$
To
msgbox "Test","Test","?,BTN1=Summary,BTN2=Detail,BTN3=Cancel,3",x$