Hi Greg,
That didn't appear to work. I created this class:
public class ButtonDataRenderer_wrappedText extends ButtonDataRenderer {
public ButtonDataRenderer_wrappedText(){
label.getStyles().put("wrapText", true);
}
}
And set the DataRenderer:
PushButton#setDataRenderer( new ButtonDataRenderer_wrappedText())
On another topic, I can't seem to bind to objects that have been nested using
bxml:include. I used to use WTKXSerializer#get() and use a "." in between
names to deliniate the name spaces. I tried using
BXMLSerializer.getNamespace().get using the same name structure and it didn't
work. Has this all changed for 2.0?
Cheers,
Scott.
On Fri, 18 Mar 2011 10:20:39 pm Greg Brown wrote:
> Yes. I thought that ButtonDataRenderer wrapped text by default, but
> apparently it doesn't. Easiest thing would be to create a custom subclass
> of ButtonDataRenderer and call label.getStyles().put("wrapText", true) in
> the constructor. Then set this as the renderer for your button.
>
> On Mar 18, 2011, at 1:42 AM, Scott Lanham wrote:
> > Hello,
> >
> > Sorry if I have asked this in the past. I can't seem to find any old
> > posts about it and my memory is not so good.
> >
> > Is it possible to get the text in a PushButton to wrap rather than clip
> > when then text is longer than the button width?
> >
> > Thanks,
> >
> > Scott.