Hi folks,
I have been scratching my head trying to do something very simple… creating a button (with the style of a link) and getting it to wrap properly. It just seems to completely ignore the setWidth.
I’ve tried both the following:
NativeButton nb = new NativeButton(“Hello World!”);
nb.addStyleName(BaseTheme.BUTTON_LINK);
nb.setWidth(10, Sizeable.UNITS_PIXELS);
Button b = new Button Hello World!");
b.addStyleName(BaseTheme.BUTTON_LINK);
b.setWidth(10, Sizeable.UNITS_PIXELS);
In both cases, the width does get set, but it’s completely ignored. I did some reading, and i think it has to do with the span element being used to contain the text, and how it won’t wrap.
I would greatly appreciate anyone giving me an alternative to use a button (with style as a link) that actually wraps and respects the setWidth call. I must use a click listener, so I that’ s why I’m trying to use the button component.
Thanks!