1. #1
    Ext User
    Join Date
    Jun 2008
    Posts
    2
    Vote Rating
    0
    sebarbraz is on a distinguished road

      0  

    Default How to hide a textfield

    How to hide a textfield


    Hi,
    I have a textfield in a panel :
    Code:
    xtype: 'textfield',
    fieldLabel: 'Research',
    id: 'searchedValue'
    I would like to hide this textfield so I do something like that :
    Code:
    Ext.getCmp('searchedValue').hide();
    -> The field is not visible any more but the label is still visible ("Research") !

    How could I hide this label ?

    Thank you...

  2. #2
    Ext User
    Join Date
    Aug 2008
    Posts
    121
    Vote Rating
    0
    sheddy is on a distinguished road

      0  

    Default


    labelStyle:'display:none'

  3. #3
    Ext User
    Join Date
    Aug 2008
    Posts
    121
    Vote Rating
    0
    sheddy is on a distinguished road

      0  

    Default


    or: hidden:true

  4. #4
    Sencha User
    Join Date
    Sep 2007
    Location
    Poland, Cracow
    Posts
    70
    Vote Rating
    0
    Evolic is on a distinguished road

      0  

    Thumbs up


    See at two config options of Class Ext.form.TextField
    • inputType : String
      Code:
      The type attribute for input fields -- e.g. radio, text, password, file (defaults to "text"). The types "file" and "password" must be used to render those field types currently -- there are no separate Ext components for those. Note that if you use inputType:'file', emptyText is not supported and should be avoided.
    • hideLabel : Boolean
      Code:
      True to completely hide the label element (defaults to false)

    I'm sure one of them will be helpful for you.

  5. #5
    Ext User
    Join Date
    Jun 2008
    Posts
    2
    Vote Rating
    0
    sebarbraz is on a distinguished road

      0  

    Default


    The problem is that I want the label being visible when the field is visible and hide the label just when I hide the field (by clicking a button for exemple).

    I also tried :
    Code:
    Ext.getCmp('searchedValue').destroy()
    but I have the same problem : the label is still visible !

  6. #6
    Ext JS Premium Member
    Join Date
    Apr 2007
    Posts
    186
    Vote Rating
    0
    Darklight is on a distinguished road

      0  

    Default


    what i did when i wanted to hide the whole field (label & input) was to get the field via Ext.get() and then move up the dom to the 2nd parent of the field (the div that contains both):

    Ext.get( FormField ).parent().parent().setStyle( 'display', 'none' );

    maybe there's a better way, but this always worked for me, since i wanted the dom block "removed" so elements below it move up... if you want to show it again just set display back to 'block'

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