PDA

View Full Version : Does maxWidth/maxHeight/minWidth/minHeight actually DO anything?



jep
4 Jan 2011, 9:19 AM
According to the docs, for Ext.Component:


maxHeight : Number
The maximum value in pixels which this Component will set its height to.

Warning: This will override any size management applied by layout managers.


maxWidth : Number
The maximum value in pixels which this Component will set its width to.

Warning: This will override any size management applied by layout managers.

(etc.)

However, near as I can tell they don't actually ever get used. The only reference I could find in any of the actual 1.0.1a code is:


adjustScale : function(){
Ext.apply(this,{
maxWidth : window.innerWidth,
maxHeight : window.innerHeight,
minWidth : window.innerWidth * .5,
minHeight : window.innerHeight * .5
});
},


in MessageBox.js. I think it's just ignored everywhere else. Am I missing something?

qpido
19 Jun 2011, 11:40 PM
Dont know how to use maxHeight, minHeight, minWidth, maxWidth either...
I need a Panel with to items, where one of them has an minHeight/maxHeight and
the second item fills the rest of the height. How is this possible?

jep
20 Jun 2011, 8:40 AM
Use the property "flex" on the one that fills in the area and set the height of the other one. So, roughly:



new Ext.Panel({
layout:{type:'vbox', align:'stretch'},
items:[{xtype:'panel', flex:1}, {xtype:'panel', height:200}]
});


It's a little hard to find information about flex since it doesn't show up in the docs for Component, Panel, etc. But you can find it if you look at the docs for Ext.layout.VBoxLayout.

qpido
20 Jun 2011, 11:12 AM
Thx for your reply, but its not exactly what I try to find out. But I realised, that my request is just not logically possible :P
Still you doesnt explain how to use minHeight and maxHeight, if I get you right...

jep
20 Jun 2011, 2:22 PM
I'm sorry, but I really don't understand what you are trying to ask me. Are you asking for help on something, are you asking about what I'm talking about by reporting that the max/min/Height/Width properties in Sencha don't do what the help claims (or anything at all, actually)? Sorry for the confusion.

qpido
20 Jun 2011, 10:23 PM
Ahh okay, that max/min/Height/Width stuff is not working at all… cool :P
Thank you anyway

mrduck
31 Oct 2012, 3:44 AM
Did you find an answer on this question?
The current version of ST1 doesn't like to respond on this parameter.

/edit/
Indeed, it doesn't seem to work. By applying a CSS stylesheet you can make it work. In the CSS stylesheet, put "max-height: XXXpx".

jep
31 Oct 2012, 7:02 AM
Nope, never did. And never expect to from Sencha staff. ST 1.x is more or less abandoned from my POV.

mrduck
31 Oct 2012, 7:52 AM
True.