Akshatha
Akshatha

Reputation: 319

2 lists inside one panel in sencha touch

How to have 2 lists in one single panel in sencha touch 2? I can see the first list if i use

layout:'card'

I tried :

 layout: {
       type: 'vbox',
       align: 'stretch'
    }

Please let me know how can i have 2 lists inside the same panel.

Upvotes: 0

Views: 1272

Answers (3)

Titouan de Bailleul
Titouan de Bailleul

Reputation: 12949

You need to use the flex config on each of your list.

You can see and example below here : Sencha Fiddle

Hope it helps

Upvotes: 1

hekomobile
hekomobile

Reputation: 1388

Hi @Akshatha you can try this into your Ext.Panel,

...
layout: {
     type: 'hbox',
     align: 'stretch'
 },
 items: [
     {
      xtype: 'list',
      width: '40%',
      flex: 1,
      styleHtmlContent: true,
      ...
     },
     {
      xtype: 'list',
      width: '60%',
      flex: 0.5,
      styleHtmlContent: true,
      ...
     },
 ]
 ...

You can define the width of Panel and you have Ext.List.

I hope help you. :)

Upvotes: 0

Naresh Tank
Naresh Tank

Reputation: 1568

create panel with vbox layout inside it create two panel with fit layout and put every list into respective panle

try this method

Upvotes: 0

Related Questions