Loading...
Important Notice - Forums is archived

To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Product icon
TUTORIAL

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

Disabling Button makes it fully invisible

Anton Nikonienkov
7 years ago Jul 25, 2015 8:15pm
Guillermo Alvarez
7 years ago Jul 25, 2015 8:39pm

Hi,

Just did a quick example using the code in the image using a 7.5.2 maven project and it worked as expected

@Override
    protected void init(VaadinRequest vaadinRequest) {
        final HorizontalLayout layout = new HorizontalLayout();
        layout.setMargin(true);
        setContent(layout);

        Button enabledButton = new Button("enabled");
        enabledButton.setEnabled(true);
        Button disabledButton = new Button("disabled");
        disabledButton.setEnabled(false);

        layout.addComponent(enabledButton);
        layout.addComponent(disabledButton);
    }

Are you working in a clean new project? Anything in special?

 

Anton Nikonienkov
7 years ago Jul 25, 2015 10:28pm
Anton Nikonienkov
7 years ago Jul 26, 2015 5:22pm