pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Lanham <li...@sael.com.au>
Subject Re: PushButton Text Wrap
Date Fri, 25 Mar 2011 05:27:08 GMT
I have been doing some experimentation.

If I put a label in cell of a grid pane it wraps. If I put a box pane in the 
cell and put the label in that, it no longer wraps.

On Fri, 25 Mar 2011 02:31:43 pm Scott Lanham wrote:
> On Tue, 22 Mar 2011 11:00:54 pm Greg Brown wrote:
> > > 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())
> > 
> > Is the button in a container that will apply a width constraint to it?
> > Alternatively, have you given the button a preferred width to wrap to?
> 
> The button is contained in a Grid Pane. The only style I set on the button
> is the font. A screen shot is attached. The buttons are on the right hand
> side.
> 
> Thanks,
> 
> Scott.

Mime
View raw message