View Full Version : Panel pixel width not working (always interpreted as percent)

18 Dec 2014, 1:06 AM

I would like to render a panel with a width defined in pixels. However, the width seems to be interpreted as percentage. When I set the width to 200 the panel exceeds the screen with, when I set it to 1 it set the width to 100% of the screen. I tried to set it with "200px" which works in common browsers but not in IE9.
This is my code:

this.items = [
xtype: 'panel',
columnWidth: 200,
height: 50,
layout: 'form',
padding: 5,
border: false,
hideBorders: true,
labelWidth: 80,
items: [
xtype: 'combo',
maxHeight: 320,
fieldLabel: 'Test',
anchor: '100%',
store: 'TestStore',
displayField: 'Name',
triggerAction: 'all',
valueField: 'Value',
hiddenName: 'Value',
tpl: '<tpl for="."><div class="x-combo-list-item" style="padding-left:{Margin}px;font-weight:{FontWeight};">{Name}</div></tpl>',
itemSelector: 'div.x-combo-list-item',
editable: false,
ref: '../filterCombo',
id: 'FilterCombo'

Thank you very much,

Gary Schlosberg
18 Dec 2014, 3:51 PM
Looks like you are using 'columnWidth' instead of 'width'. Could that be the issue? If not, in which specific version of Ext are you seeing this?

19 Dec 2014, 12:16 AM

thank you very much. This has done the trick!