swamy
swamy

Reputation: 1210

Messagebox appearing behind GXT Window -GWT

Messagebox appearing behind GXT window. after window.show() only message box is appearing.I need message box appearing before window.show().

thanks i am gettig messagebox bottom of the window

https://i.sstatic.net/UbWUz.png

Upvotes: 1

Views: 1193

Answers (1)

Marek Dec
Marek Dec

Reputation: 964

If you want to show popup windows sequentially you'll have to chain the windows show methods. It appears that you want to show the window once the MessageBox is closed. Have in mind that MessageBox methods that create dialog boxes (info, confirm, etc) do not wait box the box to be closed. window.show() does not wait either. What you have to do is to open the window once the MessageBox is closed. Most of the MessageBox creation methods have a version that accepts a callback which will be triggered when a user clicks message box buttons. See the example below:

MessageBox.prompt("My Dialog Box", "Do you want to continue?", false,
      new Listener<MessageBoxEvent>() {

            @Override
            public void handleEvent(MessageBoxEvent event) {
                if (event.getButtonClicked().getItemId().equals(Dialog.OK)) {
                    window.show();
                }
            }

Upvotes: 1

Related Questions