Results 1 to 4 of 4

Thread: Possible to create a layout and afterwards add items to it?

  1. #1

    Default Possible to create a layout and afterwards add items to it?

    When I create an accordion like this:

    Code:
    var accordion = new Ext.Panel({
    	layout: "accordion", 
    	title: "Accordion"
    });
    How can I add panels to it when not using the items config option?

    I think the object accordion should have a property items of type Ext.util.MixedCollection. When I tried to use this property (accordion.items) is was undefined?

  2. #2
    Sencha User
    Join Date
    Mar 2007
    Posts
    7,854

    Default

    Code:
    acccordion.add({title:'test',html:'abc'});
    accordion.doLayout();

  3. #3

    Default

    Thanks!

    It's actually in the docs, but as usual I experiment without reading the docs first, doh!

  4. #4

    Default

    Sometimes reading examples helps better than reading docs. Ext docs lack code snippets, I think.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •