1. #1
    Sencha User
    Join Date
    Jun 2010
    Posts
    132
    Vote Rating
    0
    ssdesign is on a distinguished road

      0  

    Default Is there a Sencha Layout Class?

    Is there a Sencha Layout Class?


    I was wondering if we have a easy to use Layout class where I can divide the screen into many segments and have different components displayed in each section.

    With iPad kind of applications, this would be really helpful.

    Am I missing something that already exists?

    Here is what I am trying to do. Is this possible?



    Thanks

  2. #2
    Sencha - Community Support Team
    Join Date
    Jun 2010
    Posts
    220
    Vote Rating
    1
    meyerovb is on a distinguished road

      0  

    Default


    Docks are very powerful for layouts, and remember 'fit' layout is meant to expand a single item to fill the space. By nesting panels with docks and layouts, you can pretty much accomplish any layout you want. Note: think about combining P2 and P4 into a tabpanel, P4 being the tabbar. P3 cannot be set to a tabbar because currently tabbar's are only styled correctly when docked on the top or bottom (add a feature request if you need that functionality, I think it would be a nice to have).

    Code:
    Ext.setup({ onReady: function () {
    new Ext.Panel({
        fullscreen: true,
        layout: 'fit',
        dockedItems: [{ dock: 'top', height: 100, html: 'P1', style: 'border:1px solid red;'}],
        items: [{ html: 'P2', style: 'border:1px solid blue;',
            dockedItems: [
                    { dock: 'right', width: 50, html: 'P3', style: 'border:1px solid pink;', scroll: 'vertical', layout: 'vbox' },
                    { dock: 'bottom', height: 50, html: 'P4', style: 'border:1px solid orange;', scroll: 'horizontal', layout: 'hbox'}]
        }]
    });
    }});

Similar Threads

  1. Absolute layout in sencha touch
    By harrylepotter in forum Sencha Touch 1.x: Discussion
    Replies: 2
    Last Post: 12 Jul 2010, 11:21 PM
  2. Unknown class 'ux-row-layout-ct' in Ext.ux.layout.RowLayout
    By sksoft in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 6 Mar 2009, 2:40 AM
  3. Suggestion for new Layout class
    By Animal in forum Community Discussion
    Replies: 3
    Last Post: 12 Oct 2007, 9:25 AM

Thread Participants: 1

Tags for this Thread