Menu

Set default Close Button Unvisible

2016-09-19
2016-09-20
  • Peter Katzmann

    Peter Katzmann - 2016-09-19

    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
  • Dieter Steinwedel

    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?

     
    • Peter Katzmann

      Peter Katzmann - 2016-09-20

      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)

       
  • Dieter Steinwedel

    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.

     

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.