CSS button selection

Hi, Can anyone tell me if how to keep the button clicked using css or something.
i want, when a button is clicked, the button to remain clicked until some other button is clicked.
Please help.

Hi Dilpreet
There’s an addon for that in the Vaadin Directory called

Hi Tomi
Thanks for help but cant i do it with the normal button?

Button itself doesn’t offer an API for such feature, but surely you can make the button appear pressed with proper style-names/styles.

Would you suggest me something on this topic, i mean a script or something.

Just add an additional style for a pressed button to your theme that makes it look like pressed for example

.v-button.activebutton { ... } and use:

myButton.addStyleName("activebutton"); and

myButton.removeStyleName("activebutton"); to toggle between the state.

Thanks Tomi