How to add a "multi-button" in table's toolbar?
Answered
I would like to add a "multi-button" in a table's toolbar. A "multi-button" like...
The "multi-button" should be added in a table's toolbar. Something like...
Does anybody know how to do this?
Please sign in to leave a comment.
Such "button" is created by implementing the DefaultActionGroup.
Jakub Chrzanowski I was using that, but when I add it to the ToolbarDecorator.setActionGroup, it was adding all the actions in the DefaultActionGroup 1 by 1. It wasn't grouping them into one "multi-button". Do I need to so anything else to make it a "multi-button"?
You have to set the popup flag to true.
I did that as well. Here's a snippet...
And then here's the output...
If you'll notice, only the icon for the group is shown (I was expecting a multi-button).
So I found the right way to do this, thanks to the Slack channel.
For the icon, you can use LayeredIcon to combine two icons. One for the icon you need and then AllIcons.General.Dropdown for the drop-down arrow.
And the correct term is actually drop-down button.