Threaded View

  1. #1
    Sencha User
    Join Date
    Sep 2012
    Location
    Oslo
    Posts
    7
    Vote Rating
    0
    SergioKastro is on a distinguished road

      0  

    Default Answered: How to disable the inputEl of a textfield in ExtJS?

    Answered: How to disable the inputEl of a textfield in ExtJS?


    I am working with ExtJS and I have a textfield component. I would like to disable only the inputEl of a textfield component (not the label).
    If I use the setDisabled() method of the textfield, then it sets disabled the inputEl but also the label.
    I have used also the setReadOnly() method, but it does not grey out the inputEl, only set asReadOnly.
    Is there a way to disable only the inputEl of a textfield component?
    Thanks for your help.

  2. You need to access labelEl of the textfield and set the opacity on that element.
    Here is the sample working code:

    Code:
    Ext.onReady(function () {
        var panel =Ext.create('Ext.form.Panel', {
            title: 'Basic Form',
            renderTo: Ext.getBody(),
            bodyPadding: 5,
            width: 350,
            items: [{
                xtype: 'textfield',
                fieldLabel: 'Field',
                name: 'theField',
              disabled: true
            }]        
        });
      
       panel.down('[xtype=textfield]').labelEl.setOpacity(1);
    });
    Thanks,
    Sriram

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