MSGBOX Button Names

Started by gmundt, December 19, 2024, 08:58:33 AM

Previous topic - Next topic

gmundt

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.

James Zukowski

#1
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.
James Zukowski
Sr. Developer - J&E

BRAND>SAFWAY
Brand Industrial Services

gmundt

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

Mike King

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?
Mike King
President - BBSysco Consulting
eMail: mike.king@bbsysco.com

martinp

#4
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$