Thanks Greg. It is all good :-)
On Sun, 27 Mar 2011 10:45:56 pm Greg Brown wrote:
> Try setting the horizontalAlignment style on the renderer's label.
>
> On Mar 26, 2011, at 7:08 PM, Scott Lanham wrote:
> > That worked :-)
> >
> > Now I just have to figure out how to get the text to align horizontally
> > to the centre.
> >
> > On Sat, 26 Mar 2011 08:14:12 am Greg Brown wrote:
> >> Oh, right. It is a horizontal box pane. If you make it vertical and set
> >> fill to true, it will wrap.
> >>
> >> On Mar 25, 2011, at 5:55 PM, Scott Lanham wrote:
> >>> Setting "fill" to true just pushes the text to the top of the button
> >>> but doesn't wrap it.
> >>>
> >>> On Fri, 25 Mar 2011 10:09:55 pm Greg Brown wrote:
> >>>> Seems like it might be related to the other button renderer discussion
> >>>> that has been going on. Try setting the "fill" style to true on the
> >>>> button data renderer itself in addition to setting "wrapText" to true
> >>>> on the label.
> >>>>
> >>>> On Mar 25, 2011, at 12:31 AM, 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.
> >>>>> <ct3_orders.png>