Hybrid View
-
17 Feb 2011 1:31 PM #1
[FIXED]Combo Box List Width
[FIXED]Combo Box List Width
Neither method for setting the combo box list width seems to work within a form.
I've tried both setting matchFieldWidth: true and setting listWidth.
In both cases I get a width significantly wider than specified. See attachment.
-
19 Feb 2011 2:56 AM #2
Can you please post some sample code to demonstrate the issue? Also the browser version.
Code:Ext.require([ 'Ext.form.FormPanel', 'Ext.layout.container.Anchor', 'Ext.data.*' ]); Ext.onReady(function() { Ext.create('Ext.form.FormPanel', { renderTo: Ext.getBody(), title: 'Form Panel', bodyStyle: 'padding:5px 5px 0', width: 600, fieldDefaults: { labelAlign: 'top', msgTarget: 'side' }, defaults: { border: false, xtype: 'panel', flex: 1, layout: 'anchor' }, layout: 'hbox', items: [{ items: [{ xtype:'textfield', fieldLabel: 'First Name', anchor: '-5', name: 'first' }, { xtype:'textfield', fieldLabel: 'Company', anchor: '-5', name: 'company' }] }, { items: [{ xtype:'combo', fieldLabel: 'Last Name', anchor: '100%', store: [[1, 'One'], [2, 'Two'], [3, 'Three']] },{ xtype:'textfield', fieldLabel: 'Email', anchor: '100%', name: 'email', vtype:'email' }] }], buttons: ['->', { text: 'Save' }, { text: 'Cancel' }] }); });Evan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!
-
21 Feb 2011 6:04 AM #3
Sure. The browser is chrome 9.0.597.98, and I've also verified it with firefox.
Code:this.mainFrame = Ext.create ('widget.window', { bodyBorder: false, closable: false, layout: 'hbox', modal: true, onExc: Ext.emptyFn, resizable: false, title: this.translate ('login', true), width: 391, items: [{ width: 111, height: 166, xtype: 'box', autoEl: { tag: 'img', src: 'img/login.png', alt: '' } }, { xtype: 'form', baseCls: 'x-plain', defaultButton: 'login', autoHeight: true, width: 240, margins: '5px 5px 5px 15px', defaults: { validateOnBlur: false, validationEvent: false, allowBlank: false }, defaultType: 'textfield', items: [{ name: 'userName', fieldLabel: 'User Name' }, { name: 'passwd', inputType: 'password', fieldLabel: 'Password' }, { xtype: 'combo', fieldLabel: 'Language', allowBlank: false, editable: false, forceSelection: true, queryMode: 'local', store: 'stores.LoginLanguages', triggerAction: 'all', displayField: 'text', valueField: 'value', value: language, matchFieldWidth: true // listWidth: 127 }], buttons: [{ text: 'Login', id: 'login', scope: this, handler: function (b) { } }] }] }); this.mainFrame.show();
-
22 Feb 2011 11:23 PM #4
Ok thanks, a fix has been added.
Evan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!
-
23 Feb 2011 5:29 AM #5
Great. Thanks!
-
25 Feb 2011 9:51 AM #6
Confirmed fixed in pr2.
Thank you for reporting this bug. We will make it our priority to review this report.
Similar Threads
-
Combo box list width (again)
By luv2hike in forum Ext 2.x: Help & DiscussionReplies: 14Last Post: 16 Jun 2011, 11:19 AM -
combo box width dependent of list items' text width
By wp.joju in forum Ext 3.x: Help & DiscussionReplies: 0Last Post: 6 Jul 2010, 9:27 PM -
Combo list width frustration.
By dlgoodchild in forum Ext 2.x: Help & DiscussionReplies: 0Last Post: 13 Aug 2009, 1:51 PM -
Combo box: item list's width doesn't match combo width
By dante in forum Ext 2.x: Help & DiscussionReplies: 2Last Post: 10 Jul 2009, 8:02 AM


Reply With Quote