How to programatically add a label to an Accordion Panel?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

How to programatically add a label to an Accordion Panel?

Marco Castillo
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
Reply | Threaded
Open this post in threaded view
|

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

cbartlett
Marco,

Use the static setHeaderData(Component, Object) method of Accordion.

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 <[hidden email]> 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

Reply | Threaded
Open this post in threaded view
|

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

Marco Castillo
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 <[hidden email]> wrote:
Marco,

Use the static setHeaderData(Component, Object) method of Accordion.

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 <[hidden email]> 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


Reply | Threaded
Open this post in threaded view
|

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

gk_brown@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 <[hidden email]> wrote:
Marco,

Use the static setHeaderData(Component, Object) method of Accordion.

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 <[hidden email]> 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



Reply | Threaded
Open this post in threaded view
|

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

xiaoyuandlg
This post has NOT been accepted by the mailing list yet.
In reply to this post by Marco Castillo
This topic making me remember the label&panel control I'd seen before, sounds very interesting. Don't know some C# code for label control would be of assistance here or not.