Changing .v-window-header for single screen

Hi,

is there a way to set the .v-window-header for a single screen?
We use Helium and version 7.2x…

For abstractWindow we could reach the vaadin components via unwrap.
But for a screen we could not find out how to do it.

Regards
Roland

Hello,

On the screen, you can call the getWindow() method. The Window contains components from the screen and its actual type (TabWindow, DialogWindow, etc) depends on OpenMode.

For instance:

@Subscribe
public void onInit(InitEvent event) {
    // sets style to the layout
    getWindow().withUnwrapped(AbstractOrderedLayout.class,
            layout -> layout.addStyleName("my-layout"));

    // sets style to the composition
    if (getWindow() instanceof WebDialogWindow) {
        ((WebDialogWindow) getWindow()).getComposition().addStyleName("my-composition");
    }
}
1 Like

thx a lot!