Results 1 to 3 of 3

Thread: Best approach to structuring an Ext.Panel

  1. #1
    Sencha User
    Join Date
    Sep 2011
    Vote Rating

    Question Best approach to structuring an Ext.Panel

    Hi Guys,

    I would just like to hear your views about the best approach to 'design' or 'structure' Ext.Panels.

    Basically what I have is a js file containing various new Ext.Panels and an Ext.List.

    To get the List and the first panel to render together I added them as items to the Panels items array. However, the examples I see on the internet for the 'onItemDisclosure' of the list and its back button ... they are just using 'card' layout, which means my approach will not work as I have multiple objects/items contained in the one Panel.

    So, my question is this:

    Should I have just one 'card' layout and design the layout of the content via HTML? Or Is there another approach to navigating back via the back button?

    I can provide code samples if necessary


  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Gainesville, FL
    Vote Rating


    Think about it... you tap on something and it goes forward in your app... you hit the back button and it goes back... what do you envision. I envision something like using card layout.

    Not knowing what version of Sencha Touch you are referring to, I will just assume you mean ST1...

    new Ext.Panel({
        fullscreen : true,
        layout : 'card',
        cardSwitchAnimation : 'slide',
        items : [
                xtype : 'panel',
                html : 'First Card
                xtype : 'panel',
                html : 'Second Card
    Now you will only see one panel at a time within the panel that has layout: 'card'
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    Learn BBCode and use it!

    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2

    Think my support is good? Get more personalized support via a support subscription.

    Need more help with your app? Hire Sencha Services

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Sep 2011
    Vote Rating

    Cool thanks for the reply


    thanks for the reply but I don't think you understood what I meant.

    See I had an Ext.Panel with a title and count total and an Ext.List obviously for a list of objects ... and wanted the two rendered together ...

    but the card layout can only render one object/item at a time.

    It's grand now though as I have found an example that uses the viewport with a card layout, which then allows you to add a Panel and a List

    thanks for the reply though

Tags for this Thread

Posting Permissions

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