1. #1
    Ext User
    Join Date
    Feb 2009
    Location
    Ukraine, Kyiv
    Posts
    27
    Vote Rating
    0
    astat is on a distinguished road

      0  

    Question [Q] combobox resize in div

    [Q] combobox resize in div


    hi,
    i have comobox witch resize into div

    Code:
    	var cb = new Ext.form.ComboBox({
    		id : idCbName,
    		store: ds,
    		displayField: 'name',
    		emptyText: empText,
    		valueField: 'id',
    	//	width: 215,
    		allowBlank: ab, 
    		loadingText: 'Поиск...',
    		minChars: 1,
    		editable: searchable,
    		valueNotFoundText: '',
    		//readOnly: ro,
    		disabled: ro,
    		listWidth :265,
    		queryDelay: 800,
    		enableKeyEvents  : true,
    		//bug fix of double esc
    		listeners: {'specialKey': function(field,e) {
    				    if (e.getKey() == e.ESC) {
    				    		e.preventDefault();
    				      }
    				    }
    				  },
    		renderTo: cbName
        });
    i need this combobox to fill this div on 100%, and resize combo when div resize. the worst - i have to do this in ie6(((

    10x

  2. #2
    Sencha User
    Join Date
    Feb 2008
    Posts
    189
    Vote Rating
    -1
    hpet is an unknown quantity at this point

      0  

    Default


    Try setting anchor: '100%' and remove width parameter.
    This should stretch combo to the width of its container - always.

  3. #3
    Ext User
    Join Date
    Feb 2009
    Location
    Ukraine, Kyiv
    Posts
    27
    Vote Rating
    0
    astat is on a distinguished road

      0  

    Default


    Quote Originally Posted by hpet View Post
    Try setting anchor: '100%' and remove width parameter.
    This should stretch combo to the width of its container - always.
    unfortunately it didn't help

  4. #4
    Sencha User
    Join Date
    Feb 2008
    Posts
    189
    Vote Rating
    -1
    hpet is an unknown quantity at this point

      0  

    Default


    Running your combo config with anchor at 100% stretches combo to the available width without problems. Or I don't understand what your realy want or you have problem somewhere else.

  5. #5
    Ext User
    Join Date
    Feb 2009
    Location
    Ukraine, Kyiv
    Posts
    27
    Vote Rating
    0
    astat is on a distinguished road

      0  

    Default


    i changed my width property on anchor, but it didn't help.

    i've set divs' width to 300 px, but my combos are not so long...

  6. #6
    Sencha User
    Join Date
    Feb 2008
    Posts
    189
    Vote Rating
    -1
    hpet is an unknown quantity at this point

      0  

    Default


    copy/paste your current config so I can check.

  7. #7
    Ext User
    Join Date
    Feb 2009
    Location
    Ukraine, Kyiv
    Posts
    27
    Vote Rating
    0
    astat is on a distinguished road

      0  

    Default


    Code:
    	var cb = new Ext.form.ComboBox({
    		id : idCbName,
    		store: ds,
    		displayField: 'name',
    		emptyText: empText,
    		valueField: 'id',
    		anchor: '100%',
    		allowBlank: ab, 
    		loadingText: 'Поиск...',
    		minChars: 1,
    		editable: searchable,
    		valueNotFoundText: '',
    		//readOnly: ro,
    		disabled: ro,
    		//listWidth :265,
    		queryDelay: 800,
    		enableKeyEvents  : true,
    		//bug fix of double esc
    		listeners: {'specialKey': function(field,e) {
    				    if (e.getKey() == e.ESC) {
    				    		e.preventDefault();
    				      }
    				    }
    				  },
    		renderTo: cbName
        });
    in what browser are you testing? i need IE6

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar