1. #11
    Ext User
    Join Date
    May 2008
    Posts
    14
    Vote Rating
    0
    john.pearl is on a distinguished road

      0  

    Default


    Add these along with your other configuration objects:

    Code:
    ,onHide: function(){this.getEl().up('.x-form-item').setDisplayed(false);} 
    ,onShow: function(){this.getEl().up('.x-form-item').setDisplayed(true);}
    .hide() and .show() will now affect the parent element.

  2. #12
    Sencha User
    Join Date
    Oct 2007
    Posts
    17
    Vote Rating
    1
    picofaradpjf is on a distinguished road

      0  

    Smile


    thanks john, that was just the trick I needed!

  3. #13
    Sencha Premium Member
    Join Date
    Feb 2009
    Location
    Amsterdam, The Netherlands
    Posts
    245
    Vote Rating
    6
    Grolubao is on a distinguished road

      0  

    Default


    Thanks john, that works perfectly!

  4. #14
    Sencha User
    Join Date
    Aug 2007
    Posts
    36
    Vote Rating
    0
    Trixor is on a distinguished road

      0  

    Default


    Thank You, solved an issue for me as well

  5. #15
    Sencha Premium Member
    Join Date
    Dec 2008
    Posts
    33
    Vote Rating
    0
    vvorobeychik is on a distinguished road

      0  

    Default


    I hit the same issue. I saw the solution of the problem. But the behaviour of the control is not an OOP aproach. The control as a whole has properties and method. If property exists it should affect the control as a whole object.
    fieldlabel is a property of the control, hidden is another property of the same control, thus the hidden property should affect the whole control, not just a part of it.

  6. #16
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    82
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    Quote Originally Posted by vvorobeychik View Post
    I hit the same issue. I saw the solution of the problem. But the behaviour of the control is not an OOP aproach. The control as a whole has properties and method. If property exists it should affect the control as a whole object.
    fieldlabel is a property of the control, hidden is another property of the same control, thus the hidden property should affect the whole control, not just a part of it.
    That would seem logical, but Ext works a bit differently.

    The fieldLabel is not actually created by the field but by the FormLayout. The Field itself has no knowledge of the form item wrapper or the field label.

    In Ext 3.0.1 and up this has been fixed in FormLayout by adding a trackLabels config option. For earlier Ext versions you can use this patch.