You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pivot.apache.org by Marco Castillo <ma...@gmail.com> on 2011/01/26 05:22:27 UTC

How to programatically add a label to an Accordion Panel?

Dear List:
I'm adding programatically panels to an Accordion. How can I set the Panel
title programatically? Using bxml, I use an Accordion.headerData attribute
to define the header text.
Thanks in advance for any help.

Regards

Marco

Re: How to programatically add a label to an Accordion Panel?

Posted by Greg Brown <gk...@verizon.net>.
You can call Accordion#getPanels().remove().

On Jan 26, 2011, at 9:55 AM, Marco Castillo wrote:

> Thank you Chris for your reply. I have another question, how can you destroy all the panels within an Accordion component?
> 
> Regards
> 
> On Wed, Jan 26, 2011 at 2:05 AM, Chris Bartlett <cb...@gmail.com> wrote:
> Marco,
> 
> Use the static setHeaderData(Component, Object) method of Accordion.
> http://pivot.apache.org/2.0/docs/api/org/apache/pivot/wtk/Accordion.html
> 
> The first parameter would be the content of the panel, and the second would be the header data for that panel.
> 
> Chris
> 
> 
> On 26 January 2011 11:22, Marco Castillo <ma...@gmail.com> wrote:
> Dear List:
> I'm adding programatically panels to an Accordion. How can I set the Panel title programatically? Using bxml, I use an Accordion.headerData attribute to define the header text.
> Thanks in advance for any help.
> 
> Regards
> 
> Marco
> 
> 


Re: How to programatically add a label to an Accordion Panel?

Posted by Marco Castillo <ma...@gmail.com>.
Thank you Chris for your reply. I have another question, how can you destroy
all the panels within an Accordion component?

Regards

On Wed, Jan 26, 2011 at 2:05 AM, Chris Bartlett <cb...@gmail.com>wrote:

> Marco,
>
> Use the static setHeaderData(Component, Object) method of Accordion.
> http://pivot.apache.org/2.0/docs/api/org/apache/pivot/wtk/Accordion.html
>
> The first parameter would be the content of the panel, and the second would
> be the header data for that panel.
>
> Chris
>
>
> On 26 January 2011 11:22, Marco Castillo <ma...@gmail.com> wrote:
>
>> Dear List:
>> I'm adding programatically panels to an Accordion. How can I set the Panel
>> title programatically? Using bxml, I use an Accordion.headerData attribute
>> to define the header text.
>> Thanks in advance for any help.
>>
>> Regards
>>
>> Marco
>>
>
>

Re: How to programatically add a label to an Accordion Panel?

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

Use the static setHeaderData(Component, Object) method of Accordion.
http://pivot.apache.org/2.0/docs/api/org/apache/pivot/wtk/Accordion.html

The first parameter would be the content of the panel, and the second would
be the header data for that panel.

Chris


On 26 January 2011 11:22, Marco Castillo <ma...@gmail.com> wrote:

> Dear List:
> I'm adding programatically panels to an Accordion. How can I set the Panel
> title programatically? Using bxml, I use an Accordion.headerData attribute
> to define the header text.
> Thanks in advance for any help.
>
> Regards
>
> Marco
>