1. #1
    Sencha Premium Member Zdeno's Avatar
    Join Date
    Nov 2009
    Location
    Prague
    Posts
    389
    Answers
    7
    Vote Rating
    17
    Zdeno will become famous soon enough

      0  

    Default Unanswered: Ext.form.field.File + setVisible

    Unanswered: Ext.form.field.File + setVisible


    Does anybody know correct way how to hide/show form.field.File? When you call
    PHP Code:
    field.setVisible(false); 
    the button is totally broken (width is arround 5px and text is missing).
    The best solution i tested is:
    PHP Code:
    field.bodyEl.up('table').setDisplayed(false);
    field.hidden true

  2. #2
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    4,904
    Answers
    369
    Vote Rating
    177
    slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold

      0  

    Default


    In 4.1.1 setVisible(false) and hide() work for me, though I'm not seeing the field when doing a show() or setVisible(). But, the showing is not working for me when working with a file field or a textfield (within a form).

    Not any better for me in 4.2 beta.
    Thought formpanel.updateLayout() or suspend/resumeLayouts might help, but no dice.

    For what it's worth here's my test code.
    Code:
    Ext.create('Ext.form.Panel', {
        renderTo: Ext.getBody(),
        width: 500,
        frame: true,
        title: 'File Upload Form',
        bodyPadding: '10 10 0',
    
    
        defaults: {
            anchor: '100%',
            allowBlank: false,
            msgTarget: 'side',
            labelWidth: 50
        },
    
    
        items: [{
            xtype: 'textfield',
            fieldLabel: 'Name'
        },{
            xtype: 'filefield',
            id: 'form-file',
            emptyText: 'Select an image',
            fieldLabel: 'Photo',
            name: 'photo-path',
            buttonText: 'upload',
        }],
    
    
        buttons: [{
            text: 'Save',
            handler: function(){
                var form = this.up('form').getForm();
                if(form.isValid()){
                    form.submit({
                        url: 'file-upload.php',
                        waitMsg: 'Uploading your photo...',
                        success: function(fp, o) {
                            msg('Success', 'Processed file "' + o.result.file + '" on the server');
                        }
                    });
                }
            }
        },{
            text: 'Reset',
            handler: function() {
                this.up('form').getForm().reset();
            }
        }, {
            text: 'Hide',
            enableToggle: true,
            handler: function (btn, pressed) {
                var ff = btn.up('form').down('filefield');
                pressed ? ff.hide() : ff.show();
            }
        }]
    });

Thread Participants: 1

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