PDA

View Full Version : autoWidth:true -v- width:'auto'



GraemeBryce
5 Feb 2008, 8:05 AM
Could someone (who really knows) please post, or point to, an explanation of the difference between:


autoWidth:true and width:'auto'
and of course


autoHeight:true and height:'auto'
Are there rules why one should use both or only one at a time?

Should it be the same across all browsers? Especially the IE6 v everything else issues?

Should one generally try to specify height and width of everything or should containers generally be allowed to scale to their child elements?

I would say that after a lot of time working with Ext, and loving it, this remains the one area where I always appear to be "guessing" and spending time trying one thing after another rather than just knowing the way it "should" be done.

If you are reading this and feel the same then please post to say so.

Thanks to anyone who can take the time to update the many.

Condor
5 Feb 2008, 8:13 AM
Setting height:'auto' or width:'auto' disables all height/width handling by Ext and lets HTML determine the height/width (I don't recommend using this).

Setting autoHeight:true or autoWidth:true will let Ext use the height/width calculation by HTML and use it for internal resizing (use only if you are not using a layout).