PDA

View Full Version : I hope Ext can supply the "Panel.prototype.setAnchor" method.



fins
21 Oct 2009, 10:29 PM
I hope Ext can supply the "Panel.prototype.setAnchor" method.

for example :



setAnchor : function(anchor){
this.anchorSpec=null;
this.anchor=anchor;
this.ownerCt.layout.layout();
}


it can resize panel by anchor-property at runtime.

Animal
22 Oct 2009, 1:09 AM
It would not be that simple. The anchor property is processed upon first layout to create a function which adjusts the Component's height/width according to the specification. This function would have to be regenerated by the layout manager.

But I agree with the principle. It would be useful if the anchor configuration was dynamically settable after render.