Hello,
in the 2.x Version an MessageBox has only a close Button if add it extra.
The 3x line adds always a close button when there is no button set.
Is there an simple way to remove this button ?
Or could it be feasible to add something like .withNoDefaultCloseButton() ?
Last edit: Peter Katzmann 2016-09-19
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
indeed in since v3.0.0 you have per default at least one button. This is intended, because otherwise you cannot close the dialog, if you have forgot to add a button to the dialog. Have I understood you correctly: Do you want to open a none closable dialog, that you close later per event?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Well our Dialog is still closeable, in this particlur case we need some extra room plus the MessageBox functionality, so we reEnable the close button of the surrounding window with mb.getWindow().setClosable(true)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have released a new version. Call the static method "MessageBox.setButtonAddClosePerDefault(false);" to disable a close button. It is applied globally and need to be called only once.
Please don't forget to vote on the vaadin addon page. Thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
in the 2.x Version an MessageBox has only a close Button if add it extra.
The 3x line adds always a close button when there is no button set.
Is there an simple way to remove this button ?
Or could it be feasible to add something like .withNoDefaultCloseButton() ?
Last edit: Peter Katzmann 2016-09-19
Hello Peter,
indeed in since v3.0.0 you have per default at least one button. This is intended, because otherwise you cannot close the dialog, if you have forgot to add a button to the dialog. Have I understood you correctly: Do you want to open a none closable dialog, that you close later per event?
Well our Dialog is still closeable, in this particlur case we need some extra room plus the MessageBox functionality, so we reEnable the close button of the surrounding window with mb.getWindow().setClosable(true)
I have released a new version. Call the static method "MessageBox.setButtonAddClosePerDefault(false);" to disable a close button. It is applied globally and need to be called only once.
Please don't forget to vote on the vaadin addon page. Thanks.