remove the maximize button Window

Gentlemen, good evening. Anyone know how to remove the maximize button Window?
Thank you.
a hug

window.setResizable(false); will remove the button but will also completely disable the ability to resize the window. If you only want to disable the maximize button you might have to use custom css to for example size the button to 0px.

hummm … Marius, you have an example of how to change the css? … thank you

//CSS:
.yourwindowclass .v-window-maximizebox{
height: 0px; //maybe add !important if it doesn't get applied
}

//Java:
yourwindow.setStyleName("yourwindowclass");//or add if there is another primary one

Now i took another look at it and the css class might actually be defined like this: .yourwindowclass .popupContent .v-window-wrap .v-window-maximizebox{ ...//see last post } So if the above suggestion doesn’t work you could try this one. In case you want to disable/hide all maximize boxes the class would be just
.v-window-maximizebox{…}

Hello, Marius. Thank you for your help. Now the windows only have the close button … Thanks anyway.
a hug

Yeah, why you’re going to have a setClosable(boolean) method to allow show/hide of the close button but no corresponding setMaximizable(boolean) method to show/hide this button is beyond me…

Doesn’t anyone review the API for consistency?

I think that in general the API is very consistent… but I would like to vote +1 for a setMaximisable(boolean) method.

The correct API for that is setResizable(boolean)

No it’s not. It’s perfectly reasonable to want to resize a window yet not have the maximize button which, unfortunately, you can only hide via CSS.

Especially considering modal dialogs; to me it makes sense to allow for a resize, but maximize definitely has no purpose. If a user maximizes a dialog, then that’s their perogative, but I don’t think I should be making that easy for them.

Ah, true. Wrong wording on my part – I meant that that’s the API that currently hides the maximize button. Those should be separate functionalities as you said.

And I didn’t really read all the previous post too carefully, so sorry for that also.

Hi,
This work to hide the maximize icon:

.no-maximize .popupContent .v-window-wrap .v-window-maximizebox::before{
height: 0px !important;
content: “” !important;
}

But not work to disable maximize function. The icon is hidden but the user can be maximize window with double click in top bar.

it would nice have a set Maximize method in the future version

Sorry all I am a new Vaadin From Cambodia, I want to remove close button on window but I don’t know how to remove it. please help !!