You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pivot.apache.org by Joseph Paterson <jo...@gmail.com> on 2012/06/26 08:47:39 UTC

Setting BoxPane Form.label programmatically

Hello,

I am creating a dynamic form where section names are only known at run
time, and I am wondering how to add a BoxPane with a Form.label attribute
programmatically. I cannot find a suitable setter on BoxPane.

Many thanks,

Joseph.

Re: Setting BoxPane Form.label programmatically

Posted by Joseph Paterson <jo...@gmail.com>.
Brilliant, thanks!

On Tue, Jun 26, 2012 at 4:56 PM, Chris Bartlett <cb...@gmail.com>wrote:

> Joseph,
>
> You should use the static Form.setLabel method for this.  Pass in the
> BoxPane (or any other Component) that should have the label and the
> label text itself.
>
>
> http://pivot.apache.org/2.0.2/docs/api/org/apache/pivot/wtk/Form.html#setLabel(org.apache.pivot.wtk.Component
> ,
> java.lang.String)
>
> Chris
>
> On 26 June 2012 07:47, Joseph Paterson <jo...@gmail.com> wrote:
> > Hello,
> >
> > I am creating a dynamic form where section names are only known at run
> time,
> > and I am wondering how to add a BoxPane with a Form.label attribute
> > programmatically. I cannot find a suitable setter on BoxPane.
> >
> > Many thanks,
> >
> > Joseph.
>

Re: Setting BoxPane Form.label programmatically

Posted by Chris Bartlett <cb...@gmail.com>.
Joseph,

You should use the static Form.setLabel method for this.  Pass in the
BoxPane (or any other Component) that should have the label and the
label text itself.

http://pivot.apache.org/2.0.2/docs/api/org/apache/pivot/wtk/Form.html#setLabel(org.apache.pivot.wtk.Component,
java.lang.String)

Chris

On 26 June 2012 07:47, Joseph Paterson <jo...@gmail.com> wrote:
> Hello,
>
> I am creating a dynamic form where section names are only known at run time,
> and I am wondering how to add a BoxPane with a Form.label attribute
> programmatically. I cannot find a suitable setter on BoxPane.
>
> Many thanks,
>
> Joseph.