2012-05-28 4 views
0

Каков наилучший способ создания встроенного управления полем со списком в ExtJS4?inline combobox

Пример кода:

 xtype:'container', 
     items:[{ 
      xtype:"component", 
      html:"this is some text that should appear before the combo: " 
     },{ 
      xtype:'combo', 
      queryMode: 'local', 
      typeAhead: true, 
      grow:true, 
      store:["Alabama Alabama Alabama Alabama Alabama Alabama","Alaska","Arizona","Arkansas","California","Colorado","Connecticut","Delaware","Georgia"] 
     },{ 
      xtype:"component", 
      html:"this is some text that should appear after the combo." 
     }] 

Желаемый выход:

this is some text that should appear before the combo:<combobox> this is some text that 
should appear after the combo. 

ответ

1

добавить следующие строки в контейнере верхнего уровня:

layout: { 
    type: 'hbox' 
} 
+0

ему необходимо, чтобы обернуть в конце строки. .. – alumb

+0

И вы действительно хотите иметь компонент ExtJs внутри? Простого элемента HTML будет недостаточно? – sha

+0

Даже не отдаленно. – alumb

Смежные вопросы