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.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Styling the MenuBar "More" item: how? No unique CSS class, set doesn't work
Hi,
Using Vaadin 7.7.3.
There is no class set to the "more" item to help me identify it (to style it in CSS).Using setStyleName doesn't seem to work.
When I try to do:
widget = new MenuBar();
widget.getMoreMenuItem().setStyleName("trying");
No style is added to the more item.
I also tried creating a new MenuItem with the style, and setting it to be the more item - still doesn't work:
MenuItem moreItem = widget.new MenuItem("", null, null);
moreItem.setStyleName("trying");
widget.setMoreMenuItem(moreItem );
I also tried extending the MenuBar class, and overwriting setMoreMenuItem so it will always set the style:
public void setMoreMenuItem(MenuItem item) {
MenuItem finalItem;
if (item != null) {
finalItem = item;
} else {
finalItem = new MenuItem("", null, null);
}
finalItem.setStyleName("trying");
super.setMoreMenuItem(finalItem);
}
Still nothing.
What is happening? Is this a bug in MenuItem.setStyleName?
How can I add a class to identify the "more" item?