Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Is there a way to remove the "x" in the messagbox popup?

Avatar

Level 1

Hello,

I have a question about Livecycle Messagebox. When we display a warning message with the "OK" and "Cancel" push buttons, there's a "x" push button in the upper right corner which allows the users to close the Messagebox. I'm wondering if there's a way to hide this "x" push button or disable it? Please help. Thanks a lot.

Fiona

4 Replies

Avatar

Level 10

Hi,

What version of Acrobat/Reader are you using?

The messageBox does not appear to have an 'x' close button. Try this...

var i = xfa.host.messageBox("Press either Yes or No", "A test", 2, 2);


if (i === 3)

{

     app.alert("The 'No' button was pressed");

}

if (i === 4)

{

     app.alert("The 'Yes' button was pressed");

}

Acrobat.png

Good luck,

Niall

Avatar

Level 1

Hi Niall,

     Thanks you for your instant response. I'm using Livecycle Designer 8.2.1 and I use Acrobat Reader 9.0. I don't use App.Alert(). I use xfa.host.messageBox("warning msg", 'title", 1, 1).

Thanks,

Fiona

Avatar

Level 10

Hi Fiona,

Okay, the 4th parameter is the issue.

There are four options:

0 = OK (will not have an 'x')

1 = OK, Cancel (will have an 'x')

2 = Yes, No (will not have an 'x')

3 = Yes, No, Cancel (will have an 'x')

Where you do not include a cancel button (0 or 2) then there wont be an 'x':

Parallels Desktop.png

However where you do include a cancel button (1 or 3) then there will be an 'x':

Parallels Desktop1.png

There wont be a workaround here (afaik), as the messagebox is driven by the OS, eg is automatically appears different on a Mac verses a Windows machine.

Good luck,

Niall