-
2 Jan 2009 5:34 AM #11
Add these along with your other configuration objects:
.hide() and .show() will now affect the parent element.Code:,onHide: function(){this.getEl().up('.x-form-item').setDisplayed(false);} ,onShow: function(){this.getEl().up('.x-form-item').setDisplayed(true);}
-
26 Jan 2009 7:09 PM #12
-
23 Mar 2009 5:02 AM #13Sencha Premium Member
- Join Date
- Feb 2009
- Location
- Amsterdam, The Netherlands
- Posts
- 217
- Vote Rating
- 2
Thanks john, that works perfectly!
-
10 Jul 2009 2:50 PM #14
-
13 Jan 2010 7:07 AM #15
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.
-
13 Jan 2010 7:14 AM #16Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 40
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.


Reply With Quote
