1. #1
    Sencha User
    Join Date
    Nov 2011
    Location
    Rotterdam, Netherlands
    Posts
    6
    Vote Rating
    0
    Richardh Rotterdam is on a distinguished road

      0  

    Default Unanswered: Numberfield, combobox layout breaks

    Unanswered: Numberfield, combobox layout breaks


    Hi I'm having trouble getting the layout to work right for the numberfield and combobox.

    I'm adding a numberfield dynamicly to a FieldContainer and this sometimes causes the up and down buttons to render below the text field.
    Example
    Code:
    Ext.define('My.form.field.DateConstraint', {
        extend: 'Ext.form.FieldContainer',
    	constructor: function() {
            this.callParent(arguments);
    		this._addNumberField();
    	},
    	_addNumberField: function() {
    		var numberfield = Ext.create('Ext.form.Number', {
    
    
            });
    		this.add(numberfield);
    	}
    });
    Anyone out there that might have an idea why the gui up and down are rendered below the text field instead of after? Or perhaps some pointers how to get that behind it after render? I removed all the CSS so I can rule that one out.

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,918
    Answers
    655
    Vote Rating
    443
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    See if this will give you the result you are looking for:

    Code:
    Ext.define('My.form.field.DateConstraint', {
        extend: 'Ext.form.FieldContainer',
        alias: 'widget.myfieldcontainer',
    
        initComponent: function (config) {
            var me = this;
    
            Ext.applyIf(me, {
                items: [
                    { xtype: 'numberfield' },
                    { xtype: 'textfield' }
                ]
            });
            
            me.callParent(arguments);
        }
    });    
    
    Ext.create('My.form.field.DateConstraint', {
        renderTo: Ext.getBody()
    });
    Regards,
    Scott.

Thread Participants: 1

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi