Change the side of Button icon

Hi!

Is it possible to change the icon of a Button to the right side of the text?

Currently I’m doing the icon with css background, but using .setIcon would be a lot handier. Then I wouldn’t have to worry about the button width.

Hi Peen, and welcome to the forums!

It’s not possible to change the side of the icon without modifying the client-side GWT-code.

On the other hand, you can specify the icon in plain CSS, as you have done already. But you don’t have to worry about the width of the button, the client-side rendering engine will handle it. As long as you specify a large enough right side padding for the button, the icon should show just fine.

Just ask if you need and example of how to do it.