Hybrid View

  1. #1
    Sencha User
    Join Date
    Nov 2011
    Posts
    17
    Answers
    1
    Vote Rating
    0
    innosia is on a distinguished road

      0  

    Default Unanswered: Combobox List Width

    Unanswered: Combobox List Width


    I look for the API of comboxbox (which is pretty useless), it mentions if I want to set the combobox list (lower part) width, use listWidth, but I try it and it doesn't work.

    var txtPrice = Ext.create('Ext.form.field.ComboBox', {
    id: 'txtPrice',
    name: 'txtPrice',
    xtype: 'combo',
    valueField:'PriceList',
    displayField:'PriceList',
    hidden: false,
    mode: 'local',
    queryMode: 'local',
    triggerAction: 'all',
    emptyText: '(Input Price Here)',
    resizable: false,
    forceSelection:false,
    store: store7,
    autoLoad: false,
    minChars: 1,
    matchFieldWidth: false,
    minListWidth: 320,
    listWidth: 320,
    autoSelect: true,
    enableKeyEvents: true,
    loadingText: "wait...",
    selectOnFocus: true,
    width:100,
    listeners: {
    loadexception: {
    fn: function (proxy, store, response, e) {
    Ext.MessageBox.alert(alert_lbl, "Fail Loading Price");
    }, scope: this
    },
    select: function (combo, record, index) {
    // var val = record[0].get("PriceList");
    // val = trim(val);
    // this.setRawValue(val);
    },
    blur : function() {
    var val = this.getRawValue();
    val = trim(val);
    this.setRawValue(val);
    }/*,
    expand: function (combo) {
    //var compcode = Ext.getCmp('selectedSymbol').getValue();
    var compcode = formPanel.down('[name=txtSelectedSymbol]').getValue();
    //store7.load({ params: { cocode : compcode } });
    }*/
    }
    });


    How to make the list width 320px?

  2. #2
    Ext JS Premium Member twaindev's Avatar
    Join Date
    Sep 2009
    Posts
    223
    Answers
    15
    Vote Rating
    3
    twaindev is on a distinguished road

      0  

    Default Try this

    Try this


    Code:
    listConfig: {
        minWidth: 320
    },

  3. #3
    Sencha User tobiu's Avatar
    Join Date
    May 2007
    Location
    Munich (Germany)
    Posts
    2,684
    Answers
    130
    Vote Rating
    112
    tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all

      0  

    Default


    well, you should not flame the api docs if you do not use them correctly.
    listWidth was an Ext JS 3 config, in 4 you have the object:
    http://docs.sencha.com/ext-js/4-0/#!...cfg-listConfig

    so you can set width to 370 or to 'auto' if you prefer it this way.

    please use code tags in the future to format your code!
    Best regards
    Tobias Uhlig
    __________

    S-CIRCLES Social Network Engine

Thread Participants: 2